- We Re Going To Model A Math Puzzle As A Shortest Path Problem Start With The Number 1 At Each Step You Can Either Tri 1 (50.67 KiB) Viewed 8 times
We're going to model a math puzzle as a shortest path problem. Start with the number 1. At each step, you can either tri
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
We're going to model a math puzzle as a shortest path problem. Start with the number 1. At each step, you can either tri
We're going to model a math puzzle as a shortest path problem. Start with the number 1. At each step, you can either triple the current number or add one to the current number. What is the minimal number of operations (steps) needed to get from 1 to 2020? There are a few different ways to solve this problem. For full credit, build an optimization model structured as a shortest path problem. Hint: you may find the following code snippet useful: [] arcs = [] for i in nodes end append! (arcs, [(i,i+1)])