窗口应用程序编程_动态编程(组件,应用程序和元素)

窗口应用程序编程

动态编程 (Dynamic programming)

  • Dynamic programming is an optimization method which was developed by Richard Bellman in 1950.

    动态编程是一种优化方法,它由Richard Bellman在1950年开发。

  • Dynamic programming is used to solve the multistage optimization problem in which dynamic means reference to time and programming means planning or tabulation.

    动态编程用于解决多阶段优化问题,其中动态意味着参考时间,而编程意味着计划或制表。

  • Dynamic programming approach consists of three steps for solving a problem that is as follows:

    动态编程方法包括三个步骤来解决以下问题:

    1. The given problem is divided into subproblems as same as in divide and conquer rule. However dynamic programming is used when the subproblems are not independent of each other but they are interrelated. I.e. they are also called as overlapping problems.
    2. To avoid this type of recomputation of overlapping subproblem a table is created in which whenever a subproblem is solved, then its solution will be stored in the table so that in future its solution can be reused.
    3. The solution of the subproblem is combined in a bottom of manner to obtain the optimal solution of a given problem.

动态编程的组成部分 (Components of Dynamic programming)

  1. Stages

    阶段

    The given problem can be divided into a number of subproblems which are called stages. A stage is a small portion of given problem.

    给定的问题可以分为多个子问题,称为子问题。 阶段是给定问题的一小部分。

  2. States

    状态

    This indicates the subproblem for which the decision has to be taken. The variables which are used for taking a decision at every stage that is called as a state variable.

    这表明必须对其做出决定的子问题。 用于在每个阶段进行决策的变量,称为状态变量。

  3. Decision

    决断

    At every stage, there can be multiple decisions out of which one of the best decisions should be taken. The decision taken at each stage should be optimal; this is called as a stage decision.

    在每个阶段,可能会有多个决策,其中应采取最佳决策之一。 在每个阶段做出的决定应该是最佳的; 这称为阶段决定。

  4. Optimal policy

    最优政策

    It is a rule which determines the decision at each and every stage; a policy is called an optimal policy if it is globally optimal. This is called as Bellman principle of optimality.

    这是一个决定每个阶段决策的规则; 如果策略是全局最优的,则称为最优策略。 这称为最佳贝尔曼原理。

动态编程的应用 (Applications of dynamic programming)

  1. 0/1 knapsack problem

    0/1背包问题

  2. Mathematical optimization problem

    数学优化问题

  3. All pair Shortest path problem

    全对最短路径问题

  4. Reliability design problem

    可靠性设计问题

  5. Longest common subsequence (LCS)

    最长公共子序列(LCS)

  6. Flight control and robotics control

    飞行控制和机器人控制

  7. Time sharing: It schedules the job to maximize CPU usage

    时间共享:它计划作业以最大化CPU使用率

动态编程的要素 (Elements of dynamic programming)

Dynamic programming posses two important elements which are as given below:

动态编程具有两个重要的要素,如下所示:

  1. Overlapping sub problem

    重叠子问题

    One of the main characteristics is to split the problem into subproblem, as similar as divide and conquer approach. The overlapping subproblem is found in that problem where bigger problems share the same smaller problem. However unlike divide and conquer there are many subproblems in which overlap cannot be treated distinctly or independently. Basically, there are two ways for handling the overlapping subproblems:

    主要特征之一是将问题分解为子问题,类似于分而治之的方法。 在该问题中发现了重叠的子问题,其中较大的问题共享相同的较小的问题。 但是,与分而治之不同,存在许多子问题,在这些子问题中,重叠不能被区别对待或独立对待。 基本上,有两种方法可以处理重叠的子问题:

    1. Top down approach自上而下的方法
    2. Bottom up approach自下而上的方法
  2. Optimal sub structure

    最佳子结构

    It implies that the optimal solution can be obtained from the optimal solution of its subproblem. So optimal substructure is simply an optimal selection among all the possible substructures that can help to select the best structure of the same kind to exist.

    这意味着可以从子问题的最优解中获得最优解。 因此,最佳子结构只是在所有可能的子结构中的最佳选择,可以帮助选择存在的同类最佳结构。

可行方案与最优方案的比较 (Comparison between feasible and optimal solution)

1) Feasible solution

1)可行的解决方案

While solving a problem by using a greedy approach, the solution is obtained in a number of stages. The solution which satisfies the problem constraints they are called a feasible solution.

在使用贪婪方法解决问题的同时,可以在多个阶段中获得解决方案。 满足问题约束的解决方案称为可行解决方案。

2) Optimal solution

2)最佳解决方案

Among all the feasible solution if the best solution either it can have a minimum or maximum value is chosen it is an optimal solution.

在所有可行的解决方案中,如果选择可以具有最小值或最大值的最佳解决方案,则它是最佳解决方案。

翻译自: https://www.includehelp.com/algorithms/dynamic-programming-components-applications-and-elements.aspx

窗口应用程序编程

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值