Live data from Hacker News

Bifurcate the Problem Space

potetm.com

21–30 of 37 posts

Re: Bifurcate the Problem Space

#21
I can't find this post from a physicist, but they had their bicycle stolen and the police had given up searching the CCTV log because it was taking them too long, despite the fact that it was pointed at the bicycle.

He told them that even if the CCTV log went back to the earth's formation, they would only need to take about 57 stills to pinpoint the second the bike was stolen (apparently they were not persuaded).

Re: Bifurcate the Problem Space

#22
post #21

I can't find this post from a physicist, but they had their bicycle stolen and the police had given up searching the CCTV log because it was taking them too long, despite the fact that it was pointed at the bicycle. He told them that even if the CCTV log went back to the earth's formation, they would only need to take about 57 stills to pinpoint the second the bike was stolen (apparently they were not persuaded).

Am I missing something? How is that?

Re: Bifurcate the Problem Space

#23
post #22
post #21

I can't find this post from a physicist, but they had their bicycle stolen and the police had given up searching the CCTV log because it was taking them too long, despite the fact that it was pointed at the bicycle. He told them that even if the CCTV log went back to the earth's formation, they would only need to take about 57 stills to pinpoint the second the bike was stolen (apparently they were not persuaded).

Am I missing something? How is that?

2^57 seconds is about 4.5 × 10^9 years, which is the age of the universe. They would only need that many stills because it would be possible to do a binary search on the footage, as each frame either has the bike in it or does not.

Re: Bifurcate the Problem Space

#24
post #22
post #21

I can't find this post from a physicist, but they had their bicycle stolen and the police had given up searching the CCTV log because it was taking them too long, despite the fact that it was pointed at the bicycle. He told them that even if the CCTV log went back to the earth's formation, they would only need to take about 57 stills to pinpoint the second the bike was stolen (apparently they were not persuaded).

Am I missing something? How is that?

[deleted]

Re: Bifurcate the Problem Space

#25
post #23
post #22

Earlier quoted context omitted.

Am I missing something? How is that?

2^57 seconds is about 4.5 × 10^9 years, which is the age of the universe. They would only need that many stills because it would be possible to do a binary search on the footage, as each frame either has the bike in it or does not.

[deleted]

Re: Bifurcate the Problem Space

#27
post #14

Earlier quoted context omitted.

Also, binary search

I more often heard and used "bisect". Is that subtly different or subtly the same?

It's the same, e.g. the git bisect command is just a binary search API for a commit history.

Re: Bifurcate the Problem Space

#29
Sure, and of course this is the essence of printf-debugging. You probably have a rough idea where the problem is, so throw in some printf statements to narrow it down, then maybe a 2nd set/etc to further narrow it as needed.

A brute force (non-targetted) binary search may always be an option if you have a problem where you don't even know where to look.

Post reply on HN