LFD Book Forum *ANSWER* HW 3, Questions 6, 7, 8
 User Name Remember Me? Password
 FAQ Calendar Mark Forums Read

 Thread Tools Display Modes
#1
03-05-2017, 07:44 AM
 ddrhoadarmer Junior Member Join Date: Feb 2017 Posts: 2
*ANSWER* HW 3, Questions 6, 7, 8

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.
#2
08-24-2018, 10:16 PM
 chrchrchr23 Junior Member Join Date: Aug 2018 Posts: 1
Re: *ANSWER* HW 3, Questions 6, 7, 8

question 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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 01:21 AM.

 Contact Us - LFD Book - Top