Triangles problem from Insomnia Qualifier 2019

Here is the problem.

Can someone please share their approach to solve these kinds of problems? What category does this problem fall under? Do we just look for this pattern:

if N<7: result \leftarrow |V|
else: result \leftarrow 8

or prove it theoretically without going much into particular cases? I’ll ask for the proof anyways. I’d really like to have some links to similar problems. Thanks a tonne! :slightly_smiling_face:

1 Like

Apply Eulerian Path to get the observation.
I spent 1 hour doing E.P. and concluded with the condition. :stuck_out_tongue:

1 Like

Thanks for the response. :slightly_smiling_face:
Damn! That’s a lot of work. Even I tried in the same way, but I made some mistakes, so I was wondering whether any other elegant proof exists for such problems. :thinking:

I did for N=1,2,3,4,5,6,7,8,9 to get the result. :wink:


Salute! I fell asleep at N = 6 that too with a wrong solution. :sleeping:

you should also see chinese postman problem.

1 Like

Thanks! I will. :slightly_smiling_face: