Page 1 of 1

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

Posted: Wed Jul 06, 2022 11:51 am
by answerhappygod
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
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 10 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 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)])