




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、Data structureBasic ConceptDataThe set of symbols which can be recognized, stored and processed by the computer.Is the carrier of information.ExamplesInteger or real. (processed by digital processing programs)Source program.( processed by compiler)Images. (processed by image processing programs)Basi
2、c ConceptData elementThe basic unit to compose a data.Can also be referred as element, record, node or vertex.Data itemData element is composed by data items.Is the smallest unit discussed in data structure.Data item is also called domain or field.Basic ConceptData structureThe set of data elements
3、which have some relationship between each other.Logical structureThe logical relationship between each other.Storage structureStorage map of logical structure in storage.Basic ConceptThe logical structure can be formally represented as : L = ( N, R )N: the set of the node. R: the set of relation on
4、N.ExamplesL = ( N, R )N = a0, a1, a2 R = r r = ( a0, a1 ), ( a0, a2 ) Basic ConceptLet L=( N, R ) is a logical structure, R= r ,If a, bN, and relation ( a, b )R, then :a is predecessor node of bb is successor node of ba and b are adjacent nodes If a node dont have predecessor, it is called start nod
5、e. If a node dont have successor, it is called final node.If a node have both predecessor and successor, it is called internal node.Basic ConceptLogical structure of dataLiner structureTree structureGraph structureSet structureBasic StructureLinear StructureThere is only one start node and final nod
6、e, every internal node have one and only one predecessor and successor.None linear structureNodes in the structure can have more than one predecessor and successor.Basic conceptEvery line represents a node (element), every line is composed of 9 domains (data items). The first line is start node, the
7、 last line is final node. The lines between the first line and last line are internal nodes.The logical structure of a table is linear structure.Basic conceptStorage structure of dataThe mapping of data elementThe mapping of relationshipThe mapping of data elementrepresenting a data element using bi
8、nary bits. (321)10 = (101000001)2 A = (001000001)2Basic conceptMapping of relationshipSequential mappingrepresenting successor relationship using relative storage location.Chaining mappingrepresenting successor relationship using pointer. x ystorage structure only contains data element information.
9、No additional info. y xBesides data element information, there is additional information in storage structure to represent the logical structure.Basic ConceptAlgorithm: a limit sequence of instructions used to solve some problems.A algorithm can be described using nature language or pseudo programmi
10、ng language.An algorithm must meet the following 5 requirements: (1) finite (2) definitude (3) input (4) output (5) feasibilityBasic conceptFinite: terminate after a finite number of steps Definitude: clear and unambiguous Same input will get same output.Input: one algorithm can have zero or many in
11、put data. The input data get from definite object set.Output: an algorithm can have one or many output. The output has specific relationship with input.Feasibility: instruction is basic enough to be carried outBasic conceptThe principles of designing algorithm CorrectnessReadabilityrobustEfficient a
12、nd low storage requirement.Basic conceptCorrectness: for all legal input, after finite times of execution, the algorithm will generate correct result.Readability : easier for designer and others to read, understand, update and reuse. Robust: When input illegal data, the algorithm can react properly.
13、Efficient and low storage requirement: efficiency means the execution time of the algorithm; Amount of storage means the maximum storage requirement. Both of them related to the scale of the problem.Basic conceptCorrection of the algorithmThere is no grammar mistakes in the program.The program can o
14、utput correct results for several groups of input data. The program can output required output for typical ,selected input. The program can output required output for all legal input.Basic ConceptPerformance Analysis Analysis after execution(machine independent)Must execute the programAffected by so
15、me other factorsAnalysis before executionspace complexity: storage requirementtime complexity: computing timeBasic conceptFactors affect execution timeThe strategy selected by the algorithmThe scale of the problemThe programming languageThe machine language generated by the compiler.The speed the co
16、mputer executing instructions.It is not good for evaluating the efficiency of an algorithm based on absolute time unitBasic ConceptWithout considering the software and hardware factors affecting the efficiency of the algorithm, “the running workload ” of a specific algorithm depends only on the scal
17、e of the problem (represented using n). Or it is the function of the scale of the problem. For example, with the increment of the scale of the problem, the increasing ratio of the execution time is the same as f(n), then we denote it as: T (n) = O( f (n) )T (n) is called time complicity of the algor
18、ithmBasic conceptAlgorithm=control structures + basic operationsNormally the execution times of some basic operations are use as the time measurement of complicity of the algorithm.void mult(int an, int bn, int(&c)nn ) for (i=0; in; +i) for (j=0; jn; +j) cij = 0; for (k=0; kn; +k) cij += aik*bkj; /for /multO(n3)Basi
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 關(guān)于手術(shù)室火災(zāi)應(yīng)急預(yù)案(3篇)
- 火災(zāi)事故應(yīng)急預(yù)案-原則(3篇)
- 行政法學(xué)職業(yè)道路試題與答案指導(dǎo)
- 動車火災(zāi)應(yīng)急預(yù)案范文(3篇)
- 地震火災(zāi)應(yīng)急處置預(yù)案(3篇)
- 計算機(jī)技術(shù)員考試全景備考試題及答案
- 2025年軟考知識點與試題及答案解析
- 網(wǎng)絡(luò)管理員考試前的試題及答案回顧
- 2025年軟考考生智慧分享及試題及答案
- 法學(xué)概論考試的教學(xué)模式分析與試題及答案
- 人人樂超市消防監(jiān)控系統(tǒng)設(shè)計
- 新生兒轉(zhuǎn)運暖箱
- 化療病人健康宣教課件
- 國家講解員培訓(xùn)課件
- 招商引資培訓(xùn)課題
- 嬰幼兒安全與意外事件防范培訓(xùn)課件
- 死因監(jiān)測工作規(guī)范
- 14000t級散貨船船體生產(chǎn)設(shè)計報告書船舶
- 設(shè)立鈑金噴漆服務(wù)公司商業(yè)計劃書
- 面試官認(rèn)證考題
- 我問你答問題100個三年級
評論
0/150
提交評論