BasicNotions - Rodrigo Silveira Computational Geometry...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Rodrigo Silveira Computational Geometry Facultat d’Inform` atica de Barcelona Universitat Polit` ecnica de Catalunya Basic notions about (geometric) algorithms What we will need Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC • Geometry • Combinatorics • Algorithms • Data structures Knowledge about What we will need Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC • Geometry • Combinatorics • Algorithms • Data structures Knowledge about • Time requirements ( An O ( n 2 log n )-time algorithm ) • Space requirements ( An algorithm that uses O ( n 2 ) space ) • Simplicity • Robustness • Correctness! Analysis of algorithms Model of computation Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC How long does it take to run an algorithm? sum ← for i = 1 to n do sum ← sum + i end for Model of computation Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC Actual running time (seconds) vs theoretical running time How long does it take to run an algorithm? sum ← for i = 1 to n do sum ← sum + i end for Depends on... • Computer • Programming language • A concrete implementation (thus on the programmer’s skills!) Defines a “standard computer”: • Units of space (variables) • Units of time (primitive operations) • We study time and spatial complexity Theoretical simplification that allows us to compare algorithms The model in computational geometry: Real RAM Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC The Real RAM Primitive operations with real numbers take constant time The model in computational geometry: Real RAM Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC The Real RAM Primitive operations with real numbers take constant time Space units • Each memory unit (variable) can hold a real number ( 2 , 1 / 3 ,π,... ) • Thus to store a number you need 1 unit, for an array with n numbers you need n units, and so on. • Accessing a variable takes constant time The model in computational geometry: Real RAM Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC The Real RAM Primitive operations with real numbers take constant time Space units • Each memory unit (variable) can hold a real number ( 2 , 1 / 3 ,π,... ) • Thus to store a number you need 1 unit, for an array with n numbers you need n units, and so on. • Accessing a variable takes constant time Primitive operations (take constant time) • Comparing two real numbers ( <, ≤ , = , 6 = ,>, ≥ ) • Arithmetic operations ( + ,- , * ,/ ) • Usual analytic functions ( log x , √ x , cos( x ) ) • Taking the integer part of a real number ( b x c ) Asymptotic Analysis Computational Geometry, Facultat d’Inform` atica de Barcelona, UPC How we measure time and space In principle, we count units of time and space, as functions of the size of the input. Asymptotic Analysis Computational Geometry, Facultat d’Inform`...
View Full Document

Page1 / 31

BasicNotions - Rodrigo Silveira Computational Geometry...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online