# Venice Bridge challenge

**URL:** <https://boards.straightdope.com/t/venice-bridge-challenge/742799>\
**Category:** Factual Questions\
**Created:** [January 11, 2016, 10:50am UTC](https://boards.straightdope.com/t/venice-bridge-challenge/742799 "2016-01-11T10:50:27Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Anny\_Middon](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Anny\_Middon](https://boards.straightdope.com/u/Anny_Middon)\
**Post date:** [January 15, 2016, 9:29pm UTC](https://boards.straightdope.com/t/venice-bridge-challenge/742799/21 "2016-01-15T21:29:25Z")

</div>

I thought this was going to be a discussion of the advantages of opening a 17-point balanced hand One Club (as in the Italian Blue System) instead of One No Trump (Standard American).😃

Leading to a bad joke: Why will The Donald never be a Life Myster? Because he refuses to bid No Trump.

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [January 17, 2016, 1:07pm UTC](https://boards.straightdope.com/t/venice-bridge-challenge/742799/22 "2016-01-17T13:07:15Z")

</div>

> [@Chronos](#):
>
> But I like this complicated decision space!
> 
> And the reason I suspect that the Y-bridge problem is NP-complete is because it looks an awful lot like the [Boolean satisfiability problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem). It’s not exactly the same, since the bridges have three states, not just two, and I’m not sure that the islands can give us the equivalent of all of the Boolean operations, but it’s at least enough to hang a suspicion on.

With Y-bridges, it’s effectively the cubic Hamitonian Path Problem (the islands themselves are minor annoyances). The current [best algorithm](https://en.wikipedia.org/wiki/Hamiltonian_path_problem) for that is O(1.251[sup]n[/sup]). While still exponential, the base is small enough to suggest it is barely exponential at most. This implies it’s likely not NP-Complete.

Oh, you do allow 3-d layouts, right? Bridges crossing over other bridges? Once you go planar, things usually get even easier.

---

<div class="post-metadata">

**Author:** ![Peter\_Morris](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/peter_morris/32/359_2.png) [@Peter\_Morris](https://boards.straightdope.com/u/Peter_Morris)\
**Post date:** [January 17, 2016, 2:00pm UTC](https://boards.straightdope.com/t/venice-bridge-challenge/742799/23 "2016-01-17T14:00:52Z")

</div>

> [@bob\_2](#):
>
> That’s the theory - there are over 400 bridges in Venice, so the next challenge would be to find the shortest possible route.

> [@beowulff](#):
>
> [Better have a fast computer.](https://en.wikipedia.org/wiki/Travelling_salesman_problem)

Beowulf links to the Travelling Salesman problem. This is incorrect. It should be the [Chinese Postman Problem](https://en.wikipedia.org/wiki/Route_inspection_problem).

They are both shortest route problems. The difference is this: In the TSP the object is to visit every island at least once. It doesn’t matter if there are some bridges you never visit. In the CPP, the object is to cross every bridge at least once.

There \*are \*algorithms to solve the CPP in a reasonable amount of time. There are none for the TSP.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [January 17, 2016, 2:42pm UTC](https://boards.straightdope.com/t/venice-bridge-challenge/742799/24 "2016-01-17T14:42:14Z")

</div>

> [@ftg](#):
>
> With Y-bridges, it’s effectively the cubic Hamitonian Path Problem (the islands themselves are minor annoyances). The current [best algorithm](https://en.wikipedia.org/wiki/Hamiltonian_path_problem) for that is O(1.251[sup]n[/sup]). While still exponential, the base is small enough to suggest it is barely exponential at most. This implies it’s likely not NP-Complete.

The link you gave seems to state that some small-base problems _are_ NP-complete (“remain NP-complete even for undirected planar graphs of maximum degree three”). Do I misunderstand?

Hamilton cycles have been suggested for use in [zero-knowledge proofs](https://en.wikipedia.org/wiki/Zero-knowledge_proof). Are they ever used for this in practical applications?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [January 17, 2016, 9:46pm UTC](https://boards.straightdope.com/t/venice-bridge-challenge/742799/25 "2016-01-17T21:46:07Z")

</div>

If you cross every (two-endpoint) bridge exactly once, then wouldn’t every path have the same length, the sum of the lengths of the bridges? Or are we including the distance traveled on the islands, from one bridge to the next?

> [@](#):
>
> Quoth **ftg** :
> 
> With Y-bridges, it’s effectively the cubic Hamitonian Path Problem (the islands themselves are minor annoyances).

I’m not sure how you’re dealing with that minor annoyance: If you treat the islands as also being vertices, then you no longer have a Hamilton path problem, since the islands need not be visited exactly once. I thought for a moment that you could treat each island as a complete graph connecting its bridges, but in that case, you’d be missing some of those vertices. If each island has exactly two bridges to it, then you could call the islands edges and be done with it, but an island could have any number of bridges.

[Previous page](https://boards.straightdope.com/t/venice-bridge-challenge/742799.md?page=1)
