Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Branch and Bound
#7
I have been playing with your code example and figuring out what it does.I think I will be able to do that on my own. How do you add rules about disallowing certain perms? I can't write it because I have no idea where to even start. What commands to use. I am used to using itertools for my perms.

Edit:
I don't quite get the purpose of the start = [] and if not sequence return start (I do know what if not does and I think this has to do with when the sequence runs out of items?)

I also can't quite grasp the feedback loop perms.extend etc. I understand it uses the same function inside itself but having a hard time visualizing it.
Reply


Messages In This Thread
Branch and Bound - by jarrod0987 - Jul-26-2018, 03:15 PM
RE: Branch and Bound - by ichabod801 - Jul-26-2018, 04:43 PM
RE: Branch and Bound - by jarrod0987 - Jul-26-2018, 04:57 PM
RE: Branch and Bound - by ichabod801 - Jul-26-2018, 05:18 PM
RE: Branch and Bound - by jarrod0987 - Jul-26-2018, 05:38 PM
RE: Branch and Bound - by ichabod801 - Jul-26-2018, 06:00 PM
RE: Branch and Bound - by jarrod0987 - Jul-26-2018, 06:38 PM
RE: Branch and Bound - by ichabod801 - Jul-26-2018, 06:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Confusion over an Except branch Mark17 1 455 Oct-13-2023, 07:45 PM
Last Post: deanhystad
  Program running on RPi 3b+ Very Strange Behavior - Out of Bound Index MadMacks 26 3,503 Mar-07-2023, 09:50 PM
Last Post: MadMacks
  Upper-Bound Exclusive Meaning Johnny1998 1 3,414 Aug-02-2019, 08:32 PM
Last Post: ichabod801
  Bound method Uchikago 1 2,187 Jul-26-2019, 04:43 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020