- **Homework 3**
(*http://book.caltech.edu/bookforum/forumdisplay.php?f=132*)

- - ***ANSWER* HW 3, Questions 6, 7, 8**
(*http://book.caltech.edu/bookforum/showthread.php?t=4753*)

*ANSWER* HW 3, Questions 6, 7, 8Am I thinking about this correctly?
Question 6: 5 because you can't form a pattern of 1 0 1 0 1 Question 7: Not (a) because a breakpoint of 5 means that for N < 5, the number of dichotomies = 2^N. For N = 1, 2^1 = 2, but (a) returns 0. Not (b) because for N = 3, 2^3 = 8, but (b) returns 4. Not (d) because it's obviously greater than the upper bound proven in class. (N + 1 choose 4 > N choose 4) So that leaves (c) or (e). For N < 5, (c) correctly returns 2^N. For N = 5, (c) returns 31, which is 1 less than 2^N which makes sense because the only pattern we can't form with 5 points is 1 0 1 0 1 But that still leaves (c) and (e). To convince myself that (c) was correct, I thought about it this way: If there are N points on a line, then there are N + 1 line segments where we could place a start/end point of one of our intervals. Split the possible dichotomies into 3 types: (i) the chosen intervals produce no "1" values 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (ii) one interval produces a single contiguous set of "1" values and the other produces no "1" values OR (both intervals produce 1s AND (they partially overlap OR completely overlap OR are touching)). The end result is that the patterns will all look something like: 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 (iii) both of the chosen intervals produce a contiguous set of "1" values AND there is no overlap AND they are not touching. In other words: 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 There's just one pattern of type (i). Trivial. There's N + 1 choose 2 patterns of type (ii). N + 1 positions to place the start/end. Pick any two distinct positions and make the points between them a 1. There's N + 1 choose 4 patterns of type (iii). N + 1 positions to place a start/end. Pick any 4 distinct positions: A, B, C, D where A < B < C < D. Make points... < A = 0 between A & B = 1 between B & C = 0 between C & D = 1 > D = 0 Adding these up gives (c). Question 8: 2M+1 because it's the only one that satisfies the answer to question 6. But I feel like there's some deeper understanding I'm missing. |

Re: *ANSWER* HW 3, Questions 6, 7, 8question 7 just used what was proved in lecture 6
C(n,k)=C(n-1,k)+C(n-1,k-1) since break point k=5 B(n,k)<=C(n,4)+C(n,3)+C(n,2)+C(n,1)+C(n,0) =(C(n,4)+C(n,3))+(C(n,2)+C(n,1))+C(n,0) =C(n+1,4)+C(n+1,2)+1 question 8: with M intervals you can only have M disjoint "+1" intervals with a dichotomy that has M+1 disjoint "+1" intervals you've reached the breakpoint each interval contains a minimum of 1 such "+1" point, that's M+1 points seperate them with a minimum of M "-1" points you get break point k=(M+1)+M=2M+1 |

All times are GMT -7. The time now is 04:41 AM. |

Powered by vBulletin® Version 3.8.3

Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.