8.1 CONCEPT INFORMAL DEFINITION Algorithm(算法): a step-by-step method for solving a problem or doing a task.(逐步解决问题或完成任务的方法) In this definition, an algorithm is independent of the computer system(独立于计算机系统). More specifically, we should also note that the algorithm accepts a list of input data and creates a list of output data.(输入一组数据,产生一组输出数据) Input The algorithm accepts the list of five integer as input. Processing The algorithm uses five steps to find the largest integer. Output Because there are no more integers to be processed, the algorithm outputs the value of Largest, which is 13. DEFINING ACTIONS REFINEMENT GENERALIZATION 8.2 THREE CONSTRUCTS 8.3 ALGORITHM REPRESENTATION FLOWCHART(流程图) A flowchart is a pictorial representation of an algorithm. It shows how the algorithm flows from beginning to end. PSEUDOCODE(伪代码) Pseudocode is an Englishlike representation of an algorithm. It is part English and part structured code.(类似英语的表示方法) 8.4 MORE FORMAL DEFINITION Algorithm: an ordered set of unambiguous steps that produces a result and terminates in a finite time(一组明确步骤的有序集合,它产生结果并在有限时间内终止). ORDERED SET(有序集合) An algorithm must be a well-defined, ordered set of instruction. UNAMBIGUOUS STEPS (明确步骤) Each algorithm must be clearly and unambiguously defined. PRODUCE A RESULT (产生结果) An algorithm must produce a result; otherwise, it is useless. The result can be data that are returned to the calling algorithm or same other effect (e.g., printing). TERMINATE IN A FINITE TIME(在有限时间内终止)An algorithm must terminate (halt). If it does not (e.g., has an infinite loop), you have not created an algorithm. 8.5 SUBALGORITHMS(子算法) The principles of structured programming, require that an algorithm be broken into small units called subalgorithms (the terms subprograms, subroutines, procedures, function, methods, and modules are also used). Each subalgorithm is in turn divided into smaller subalgorit
您可能关注的文档
- 2010年硕士研究生入学考试-华北电力大学(保定)研究生院.doc
- 2012年科研工作报告-广东第二师范学院.ppt
- 2013年绍兴市英语高三一模答题情况分析以及高考备考建议.doc
- 2014年自学考试中国古代文学作品选.ppt
- 2015高等数学B1授课计划-杭州电子科技大学理学院.doc
- 2017--2018学年第一学期临潼校区第二十周期末考试安排表(一).PDF
- 2017年高考冲刺语文学科考前指导(1)一、指导思想结合近几年江苏.doc
- 2017年应届大学生校园招聘职位列表.doc
- 2017数学与应用数学.doc
- 2018年湖北省普通高等学校招收中等职业学校毕业生单独招生考试文化.doc
- 2026年中国窗饰产品市场全景调查与市场供需预测报告.docx
- 2026年中国船舶水下清洗行业深度研究报告:市场需求预测、进入壁垒及投资风险.docx
- 2026年中国船用绞车行业运行态势及十五五盈利前景预测报告.docx
- 2026年中国橱柜行业深度调研报告.docx
- 2026年中国船用绞车市场深度调研及投资前景战略分析报告.docx
- 2026年中国船用配套设备市场发展策略及投资潜力可行性预测报告.docx
- 2026年中国储能材料行业运营态势与投资前景预测分析报告.docx
- 2026年中国储氢材料行业运营现状及发展规划分析报告.docx
- 2026年中国传真机市场深度研究及投资前景咨询报告.docx
- 2026年中国储能变流器(PCS)产业深度评估与发展前景趋势分析研究报告.docx
原创力文档

文档评论(0)