当前位置:网站首页>Online and offline problems
Online and offline problems
2022-07-06 06:12:00 【Zhan Miao】
1. Online questions
Not knowing all the instance information when making decisions , Decisions made cannot be changed after more information is presented .
2. Offline problems
Examples of all known problems before decision .
3. Online algorithms
You can process the input one by one in a serialized way , In other words, you don't need to know all the inputs at the beginning . Relative , For one Offline algorithm , Know all the data you need to enter at the beginning of the problem , And output the results immediately after solving a problem . for example , Selection sort Before sorting, you need to know all the elements to be sorted , However Insertion sort You don't have to .
Because the online algorithm does not know the whole input , So the choices it is forced to make may eventually prove to be suboptimal , The research on online algorithm mainly focuses on how to make a choice in the current environment . Online algorithms for the same problem and Offline algorithm The above viewpoint is formed by the comparative analysis of . If you want to know about online algorithms from other perspectives, you can take a look Stream Algorithm ( Focus on the amount of memory used to accurately present past inputs ), Dynamic algorithm ( Focus on what is needed to maintain an online input result Time complexity ) And online machine learning .
A good example of the concept of online algorithms is the Canadian Traveler Problem , The goal of this problem is to reach a target node with the least cost in a weighted graph , But some edges of this weighted graph are unreliable , May have been eliminated . However, a traveler can only determine whether an edge has been removed when he reaches an endpoint of that edge . In the worst case , The problem will become simple , That is, all uncertain edges are removed, and the problem will become common Shortest path problem .
4. Offline algorithm
Offline algorithm design strategies are based on the basic assumption that the input data is known before the implementation of the algorithm , in other words , For an offline algorithm , Know all the data you need to enter at the beginning of the problem , And output the results immediately after solving a problem , Usually, this kind of algorithm designed under the premise of complete information of the problem is called offline Algorithm .
reference
The concept of online algorithm and offline Algorithm - daiyl0320 - Blog Garden
边栏推荐
- Leaflet map
- 测试周期被压缩?教你9个方法去应对
- [Thesis code] SML part code reading
- 功能安全之故障(fault),错误(error),失效(failure)
- 黑猫带你学UFS协议第4篇:UFS协议栈详解
- 【Postman】Monitors 监测API可定时周期运行
- 职场进阶指南:大厂人必看书籍推荐
- 如何在业务代码中使用 ThinkPHP5.1 封装的容器内反射方法
- The difference and usage between continue and break
- A complete collection of necessary learning websites for office programmers
猜你喜欢
![[wechat applet] build a development tool environment](/img/f6/51f97b1c927337b34c5b3a4207abb4.png)
[wechat applet] build a development tool environment

Properties file

CoordinatorLayout+NestedScrollView+RecyclerView 上拉底部显示不全

误差的基本知识

LeetCode 739. 每日温度

MySQL之基础知识

数字三角形模型 AcWing 1015. 摘花生

【Postman】Collections-运行配置之导入数据文件

IPv6 comprehensive experiment

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
随机推荐
How Huawei routers configure static routes
【eolink】PC客户端安装
Caused by:org. gradle. api. internal. plugins . PluginApplicationException: Failed to apply plugin
数据库隔离级别
Cannot create PoolableConnectionFactory (Could not create connection to database server. 错误
【LeetCode】Day96-第一个唯一字符&赎金信&字母异位词
Properties file
Request forwarding and redirection
IP day 16 VLAN MPLS configuration
Company video accelerated playback
Gtest之TEST宏的用法
Buuctf-[bjdctf2020]zjctf, but so (xiaoyute detailed explanation)
Pat (Grade B) 2022 summer exam
ContentType的作用
對數據安全的思考(轉載)
leaflet 地图
Overview of three core areas of Mathematics: geometry
Postman核心功能解析-参数化和测试报告
(5) Explanation of yolo-v3 core source code (3)
Luogu p1460 [usaco2.1] healthy Holstein cows