1 / 8

A core Course on Modeling

A core Course on Modeling. Introduction to Modeling 0LAB0 0LBB0 0LCB0 0LDB0 c.w.a.m.v.overveld@tue.nl v.a.j.borghuis@tue.nl P.15. Criteria for modeling: scalability.

bree
Download Presentation

A core Course on Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A core Course on Modeling Introductionto Modeling 0LAB0 0LBB0 0LCB0 0LDB0 c.w.a.m.v.overveld@tue.nl v.a.j.borghuis@tue.nl P.15

  2. Criteria for modeling: scalability Scalability: towhichextentcansomecharacteristicdimensions of the problemincrease, where the model stillfunctions? Scale: n (=number of elements, states, records, time steps, …) Performance: • O(1) – solving effort (SE) does not depend on n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial

  3. Criteria for modeling: scalability Example: tofindsomething in a database usingindexingtakes no more time ifther are more stored records. Comparethistousingan index in a thickbook: no needto browse over the pages. • O(1) – solving effort (SE) independent of n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial O(1) n

  4. Criteria for modeling: scalability Example: tofindsomething in anordered, non-indexed set takes placebyrepeatedlyhalving (cf. guessing a numberbetween 0 and 1024: this takes no more than 10 higher-lowerguesses). WithN trials you search a set of size 2N, so a set of size M is searched in log M trials. • O(1) – solving effort (SE) independent of n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial O(log n) n

  5. Criteria for modeling: scalability Manyproblemsrequirethatsomething (with a fixedamount of effort) needs do bedoneforeach item in a set. In such cases, the total effort growsproportially with the size of the set. • O(1) – solving effort (SE) independent of n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial O(n) n

  6. Criteria for modeling: scalability Sorted sets allowthingstobedone (e.g., searching) muchfaster. Soifyoufrequentlyneedto search some set, itmaypay off tosortitonceand keep itsorted. Sorting a set of n elementscanbedone in O(n log n) steps. • O(1) – solving effort (SE) independent of n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial O(n logn) n

  7. Criteria for modeling: scalability The dot product of twovectors takes O(n) in the dimension n. Multiplying a vector with a matrix O(n2). Multiplyingtwo matrices O(n3). Solving a linear set of equations O(n3). Many of these operations allowalternative approaches to win some efficiency (http://en.wikipedia.org/wiki/Computational_complexity_of_mathematical_operations). • O(1) – solving effort (SE) independent of n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial O(np) n

  8. Criteria for modeling: scalability • O(1) – solving effort (SE) independenten of n • O(log n) – SE hardlydepends on n • O(n) – SE proportionalto n • O(n log n) – SE slightlyworsethanproportional • O(np) – SE polynomial • O(2n), O(n!), … – SE worsethanpolynomial Given n points; askedfor the shortest route visitingthemall (traveling salesman problem, TSP). Manyproblemscanbetransformedtothis type. O(1) n

More Related