Poland Liceum ogólnokształcące, klasa I Computer science (extended level)
Chapters: 1
1. Understanding, analysing and solving problems
Algorithmic methods · Mathematics and data representation
- Algorithm Design Techniques – To design an algorithm, first specify the problem: the input data, the expected output and any conditions. Then write clear, finite steps in natural language, as a list, pseudocode or flowchart. Big problems are split top-down into smaller parts (stepwise refinement) or built bottom-up from small tested pieces. Classic techniques: brute force (try everything), divide and conquer (split, solve, combine; halving as in binary search and merge sort), greedy (take the best-looking choice each time; fast but not always optimal), dynamic programming (solve each small subproblem once and store it in a table) and backtracking (try a choice, undo it at a dead end). Choose the technique and data structures (arrays, stacks, binary trees) by checking correctness and efficiency (time complexity).
- Data Representation: How Computers Store Numbers, Text, Images and Sound – Data is raw facts; information is data given meaning; knowledge is information we can use. A computer stores all data as bits (0 or 1). 8 bits make a byte, and 1 kB = 1000 bytes, 1 MB = 1000 kB, 1 GB = 1000 MB, 1 TB = 1000 GB. Numbers are stored in binary, where place values double: 1, 2, 4, 8 and so on. Text uses a character set: in ASCII 'A' is 65; Unicode covers every script. A bitmap image is a grid of pixels; size = width × height × colour depth. Sound is sampled: size = sample rate × bit depth × seconds. Vector images store shapes instead of pixels. Compression makes files smaller: lossless keeps every bit, lossy throws some detail away.