当前位置:网站首页>在线问题与离线问题
在线问题与离线问题
2022-07-06 05:58:00 【瞻邈】
1. 在线问题
决策时未掌握全部实例信息,已做的决策在更多信息呈现后不可更改。
2. 离线问题
实例在决策前全部已知的问题。
3. 在线算法
可以以序列化的方式一个个的处理输入,也就是说在开始时并不需要已经知道所有的输入。相对的,对于一个离线算法,在开始时就需要知道问题的所有输入数据,而且在解决一个问题后就要立即输出结果。例如,选择排序在排序前就需要知道所有待排序元素,然而插入排序就不必。
因为在线算法并不知道整个的输入,所以它被迫做出的选择最后可能会被证明不是最优的,对在线算法的研究主要集中在当前环境下怎么做出选择。对相同问题的在线算法和离线算法的对比分析形成了以上观点。如果想从其他角度了解在线算法可以看一下 流算法(关注精确呈现过去的输入所使用的内存的量),动态算法(关注维护一个在线输入的结果所需要的时间复杂度)和在线机器学习。
一个很好的展示在线算法概念的例子是加拿大旅行者问题,这个问题的目标是在一个有权图中以最小的代价到达一个目标节点,但这个有权图中有些边是不可靠的,可能已经被剔除。然而一个旅行者只有到某个边的一个端点时才能确定该边是否已经被移除了。最坏情况下,该问题会变得简单,即所有的不确定的边都被移除该问题将会变成通常的最短路径问题。
4. 离线算法
离线算法设计策略都是基于在执行算法前输入数据已知的基本假设,也就是说,对于一个离线算法,在开始时就需要知道问题的所有输入数据,而且在解决一个问题后就要立即输出结果,通常将这类具有问题完全信息前提下设计出的算法成为离线算法。
参考文献
边栏推荐
- [email protected] raspberry pie
- 华为BFD的配置规范
- Dynamic programming -- knapsack problem
- 公司視頻加速播放
- 2022 software testing workflow to know
- Embedded interview questions (I: process and thread)
- Huawei BFD configuration specification
- 进程和线程
- [experience] when ultralso makes a startup disk, there is an error: the disk / image capacity is too small
- (5) Explanation of yolo-v3 core source code (3)
猜你喜欢

MIT6.s081-2020 Lab2 System Calls

Report on market depth analysis and future trend prediction of China's arsenic trioxide industry from 2022 to 2028

SQLMAP使用教程(三)实战技巧二

Network protocol model
![[course notes] Compilation Principle](/img/cc/34e86087cc5698f9bed91675369265.jpg)
[course notes] Compilation Principle

Rustdesk builds its own remote desktop relay server

(5) Explanation of yolo-v3 core source code (3)

数学三大核心领域概述:代数

The usage and difference between strlen and sizeof

Huawei BFD configuration specification
随机推荐
Station B, Mr. Liu Er - multiple logistic regression, structure 7
H3C S5820V2_ Upgrade method after stacking IRF2 of 5830v2 switch
Redistemplate common collection instructions opsforvalue (II)
A master in the field of software architecture -- Reading Notes of the beauty of Architecture
[happy Spring Festival] if you feel happy, dance
Summary of data sets in intrusion detection field
Embedded interview questions (IV. common algorithms)
MPLS test report
nodejs实现微博第三方登录
continue和break的区别与用法
入侵检测领域数据集总结
Memory and stack related concepts
How to use the container reflection method encapsulated by thinkphp5.1 in business code
Mysql database master-slave cluster construction
【论文阅读】NFlowJS:基于鲁棒学习的合成负数据密集异常检测
Software test interview questions - Test Type
误差的基本知识
Garbage collector with serial, throughput priority and response time priority
Bit operation rules
GTSAM中李群的运用