Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dep k with m nodes on cycle:
- Rule: Number of leaves is equal to sum a_i - 2.
- Rule: Must have more than one cycle vertex.
- All cycle vertices must have deg at least 3.
- m nodes on cycle, k depth: need at least 3 vertices in cycle.
- Need at least m(k-1) extenders.
- Seems a little easier to just depthmax?
- Two vertices on cycle. Even # of extenders: Okay.
- Odd # of extenders: Maybe invalid.
- We can def handle:
- All 2s
- 2 or more 3+'s, even number of extenders (assuming balance constraint).
- No 2's, balance constraint respected (build cycle)
- Wait balance constraint is just sum of degrees is 2n lol.
- We def can't handle:
- - Sum of degs != 2n
- - 3322211, 33211, etc
- Iterate over # of vertices in cycle?
- 33: Even # of 2's ok
- 333: one 2 okay, two 2's bad, three 2's okay, four 2's ok. Generally anything except two 2's is ok.
- 43: One 2 bad, two 2's ok, three 2's ok, four 2's ok, five 2's ok, generally anything we want is okay.
- 44: One 2 bad, 2+ is always fine.
- two cycle vertices, one 2 is always bad.
- Can we do a greedy assignment or something?
- Generally: with two cycle vertices, 2+ 2's is always fine UNLESS 33 and odd number of 2's.
- No 2's: Okay
- 2+ cycle vertices:
- Ok unless (a) only one extra and it's a 2 or (b) 33 and odd # of 2's.
- Aside from these cases, there must be at least two extras.
- Case 1. Even # of extras.
- If sum is not 2n: Bad
- If all 2's: Ok
- Otherwise, there is at least one 1. If only one cycle vertex, bad.
- If no 2's, okay (build cycle out of them, connect others).
- If there's an even # of 2+ vertices, then we can split them.
- If there are just three vertices with deg >= 1 and one is a 2 (note that we must have two cycle vertices), then bad.
- If there's a 4 or above, we can add one extra connector to the 4 and then split the rest.
- If there are 33 and then odd # of 2's, OR 33322111, then bad.
- Last case: Odd # of connectors with at least three 3's. Build 33 cycle, connect a 3 to the first one and an extra to that 3. This is definitely possible (must have a third 3 bc otherwise it would be odd # of 2's, must have at least one 2 giving four total vertices, must have odd number of connectors so at least one more
- What if 33322111?
- At least one 1, at least 2 >2
- at least one 2
- odd # of 2+s
- At least five 2+s
- No 4+s
- At least three 3's
Advertisement
Add Comment
Please, Sign In to add comment