首页 > > 详细

辅导 MATH3202、讲解 Python程序语言

MATH3202/7232 Operations Research & Mathematical Planning 2024
Tutorial 8 – Dynamic Programming

Python Functions
Define functions in Python to
• Calculate the factorial of a number n
• Calculate the value function for the ‘Minimal Studying’ problem
• Determine the optimal solution for the ‘Minimal Studying’ problem

Knapsack Problem
We have a container of size 20 units, and want to pack it with the following
valuable items:
Item j Size vj Value tj

How many of each item should we pack in order to maximize the total value?

Fibonacci Sequence
Define a function in Python to calculate the number in the Fibonacci
sequence.


联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!