Help needed in Solving Graph Problem.

Правка en2, от aditya_sheth, 2020-07-23 09:01:08

Can someone please help me solve this problem. I came up with the following observations:

1) the first bit of the binary number should be 1.

2) we can think of each binary prefix(modulo n) as a node of the graph. So finally we need to find a hamiltonian cycle starting at 0 and ending at 0 where each node has an outgoing edge to the nodes (2*node)%n and (2*node+1)%n.

I am unable to progress further. Any help/hint will be really helpful.

Теги #graph theory, codeforces::gym

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский aditya_sheth 2020-07-23 09:01:08 38 Tiny change: 's further.' -> 's further. Any help/hint will be really helpful.'
en1 Английский aditya_sheth 2020-07-22 17:01:03 495 Initial revision (published)