Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis of Trends and Patterns

Similar presentations


Presentation on theme: "Analysis of Trends and Patterns"— Presentation transcript:

1 Analysis of Trends and Patterns
The goal is to identify the trend or pattern precisely Don’t stop at simply identifying the “next step”. Explicitly state what the pattern is that defined the next element in the series.

2 Sample Problems A B A C A D A E __ __ __
__ __ __ __ __ __ 1 z 3 w 9 t 27 q 81 __ __ __ JKLMNO JKLMON JKLOMN JKOLMN __ __

3 Don’t be Blind For most problems, people use a relevant strategy from habit. There’s an excellent reason for this: It usually works!! Sometimes, the habit strategy is a bad match for the problem. In this case, people can act like they are “blind” to the solution. Example: Water jar problem.

4 Jars Problem You have 2 jars (odd shape), of sizes 5 gallons and 3 gallons. You need to measure out exactly 4 gallons. Or the bomb blows up…

5 Jars Problem #2 You have 3 jars, of sizes 11 quarts, 9 quarts, and 4 quarts. You would like to use these jars to collect 6 quarts of water in one jar. How?

6 Jars Problem You have 3 jars, of sizes 11 quarts, 9 quarts, and 4 quarts. You would like to use these jars to collect 6 quarts of water in one jar. How? A B C Goal 11 9 4 6 A – B + C 21 127 98 15 90 67 14 163 25 99 18 43 10 5 22 20 59 31 36 8 28 76 3

7 Einstellung “Einstellung” is the state of being “blind” or “set” in something. “Functional Fixedness”: People often fail to see alternate uses to an object once they assign it a role. People are fairly predictable in their susceptibility to functional blindness. Awareness of the problem helps to avoid it. This is real issue for students and in “real life” Example: Debugging, algorithm design

8 Lateral Thinking “Vertical Thinking” is sticking with the current approach, being rigid. “Lateral Thinking” is coming at a problem from a different (perhaps non-standard) direction. Often, just realizing that this should be done is enough to find a good solution (getting out of the old approach). Of course, it can be hard to tell when you are in the trap! It helps to have a “flexible” mindset.

9 Examples of Lateral Thinking
Unsticking a car lock on a cold night Approach 1: Heat the key Approach 2: Unfreeze the lock (with alcohol) Need to iron a shirt, but no iron Iron with something else (a frying pan) Sheep in front of the truck Approach 1: Beep horn, try to push or scare sheep Approach 2: Lead the sheep behind the truck

10 A powerful strategy: Symmetry
The world is full of symmetry, so use it!

11

12 The ubiquitous symmetry
Truncated icosahedron. Paper model. Icosahedral symmetry in viruses. From Robijn Bruinsma’s web site

13 The ubiquitous symmetry

14 Heuristic: Look for Symmetry
If you find a symmetry, you might be able to exploit it Symmetries give you “free” information, cut down on what to look at Symmetries define an invariant Symmetries indicate “special” points

15 Symmetry Problem (2D) A B
Is molecule “A” the same chemical compound as “B”?

16 Symmetry Problem (2D) A B
Is molecule “A” the same chemical compound as “B”?

17 Symmetry Problem (3D) B A
Is molecule “A” the same chemical compound as “B”?

18 Symmetry Problem An NxN matrix “A” is such that for any
element a_ij = a_ji. How much memory will it take to store such matrix? Assume 32 bits per float.

19 Symmetry Problem How many N-bit strings contain anywhere from
none to (N-1)/2 zeros (inclusive)? N is odd. Hint: There are exactly the same number of strings with K zeroes as there are strings with (N - K) 1s. Say, N=3. (000) <=> (111) (010) <=> (101)

20 Symmetry Problem How many N-bit strings contain anywhere from
none to (N-1)/2 zeros (inclusive)? N is odd. Let C(N,k) be the number of substrings that have exactly k zeroes. Then C(N, k) = C(N, N-k). The problem is symmetric under 1 -> 0 exchange. A substring with N-k zeroes contains k 1s. Now, C(N,0) + C(N, 1) + … + C(N,N) = all possible substrings = 2^N. We need the first 1/2 terms of the sum, which equal the second half. Thus, the answer is 2^N/2 = 2^(N-1).

21 Symmetry Problem What is the ratio of the areas of the two squares?

22 Symmetry Problem What is the ratio of the areas of the two squares?
IS it clear now?

23 Symmetry Problem Your cabin is two miles due north of a stream that runs east-west. Your grandmother’s cabin is located 12 miles west and one mile north of your cabin. Every day, you go from your cabin to Grandma’s, but first visit the stream (to get fresh water for Grandma). What is the length of the route with minimum distance? Stuck? Draw a picture!

24 Problem: Compute …. + N

25 A more difficult one: Give an approximate estimate to N!, where N=2718.

26 Symmetry applied to CS: encodings and error correction
First known encoding: Author: God, around 6,000 years ago. The genetic code. 4 letters, words of 3 letters each. 64 words in total. Error tolerance: extremely good. (the double helix. Two-fold redundancy)

27 Symmetry applied to CS: encodings and error correction
Second attempt: Author: Baudot, 1874. English alphabet. Strings of 5 zeroes or ones. 32 different letters. (e.g = X, = Y, etc. Error tolerance: none. How about English language? Is it error tolerant?

28 Symmetry applied to CS: error correction
Two code words: (000) and (111). What if one bit is erred in transmission? How do you recover?

29 Symmetry applied to CS: error correction
Two code words: (000) and (111). What if one bit is erred in transmission? How do you recover? Go to the nearest vertex!

30 Symmetry applied to CS: error correction
Pretty poor solution…. First spacecraft to send back pictures of Mars (Mariner 4, 1965). Each picture ~ 4,000 pixels, 64 shades of grey. On-board power supply allowed only 8 bits per second to be sent…

31 Symmetry applied to CS: better error detection:
code words: (000), (011), (110), (101). Corners of a tetrahedron. How do you detect an error?

32 Symmetry applied to CS: better error detection:
code words: (000), (011), (110), (101). Corners of a tetrahedron. How do you detect an error? An error in one digit move the word off the tetrahedron.

33 Symmetry applied to CS: realistic error correction:

34 Symmetry applied to CS: realistic error correction:
1 1 Parity bit. (odd # of 1s in row) Parity bit. To transmit (0111) you send ( ). In fact, this error correcting code defines a symmetric shape on an 8-dimensional hypercube


Download ppt "Analysis of Trends and Patterns"

Similar presentations


Ads by Google