Media formats, AI basics, and graphs
Topics: Multimedia elements: text, image, audio, video, animation; compression and formats; graphics basics; history of AI, knowledge representation, search; graphs, degree, Euler and Hamilton paths, trees.
Multimedia and compression
Raw media are large: an image needs width × height × bits per pixel; CD audio needs sampling rate × bits × channels per second. Compression is lossless (PNG, ZIP, FLAC) or lossy (JPEG, MP3, H.264), which discards detail people barely notice. Compression ratio = original size ÷ compressed size.
- Image bytes = W × H × bytes per pixel
- CD audio = 1411.2 kbit/s
- Lossless vs lossy
Example: How large is an uncompressed 1920 × 1080 image at 24 bits per pixel?
- 1920 × 1080 × 3 bytes.
- = 6 220 800 bytes ≈ 6.2 MB.
Answer: ≈ 6.2 MB
Example: Find the bit rate of CD audio (44.1 kHz, 16-bit, stereo) and the size of one minute.
- 44 100 × 16 × 2 = 1 411 200 bit/s.
- × 60 s ÷ 8 ≈ 10.6 MB.
Answer: 1411.2 kbit/s; ≈ 10.6 MB
Artificial intelligence and search
AI studies machines that act intelligently: search, knowledge representation (logic, rules, semantic nets, frames), learning and perception. Uninformed search: breadth-first (complete, finds the shallowest goal) and depth-first (little memory). Informed search uses heuristics: A* expands the node with the least f = g + h. A tree with branching factor b and depth d has about bᵈ leaves.
- BFS: shallowest goal; DFS: low memory
- A*: f = g + h
- Search tree size ≈ bᵈ
Example: A puzzle has branching factor 3. How many nodes are at depth 4?
- 3⁴.
- = 81.
Answer: 81
Example: Which search always finds the shallowest solution first?
- It explores level by level.
- Breadth-first search.
Answer: BFS
Graph theory
A graph is vertices joined by edges. Handshaking lemma: the sum of degrees is twice the number of edges. An Euler circuit (every edge once, back to start) exists in a connected graph exactly when every vertex has even degree; an Euler path when exactly two have odd degree. A complete graph Kₙ has n(n − 1)/2 edges; a tree with n vertices has n − 1 edges.
- Σ deg = 2E
- Euler circuit ⇔ all even degrees
- Tree: n − 1 edges
Example: A graph has degrees 3, 3, 2, 2. How many edges?
- Σ deg = 10 = 2E.
- E = 5.
Answer: 5
Example: How many edges has K₅?
- 5 × 4/2.
- = 10.
Answer: 10
Multimedia combines text, images, audio, video and animation. Raster images are made of pixels and vector images of equations, so vectors scale without loss. RGB suits screens; CMYK suits print. JPEG and MP3 are lossy; PNG and ZIP are lossless. Audio samples at twice the highest frequency, and uncompressed size = rate × bits × channels × time. In AI, A* uses a heuristic, and knowledge is shown with logic and rules. In graph theory the sum of degrees is twice the edges. An Euler path uses each edge once and exists with 0 or 2 odd-degree vertices; a Hamilton path visits each vertex once. A tree with n vertices has n − 1 edges.
- GIF supports simple animation.
- CD audio: 44.1 kHz, 16 bits, stereo.
- Alpha channel holds transparency.
- Turing test checks machine intelligence.
- BFS finds the fewest-edge path.
Key formulas
- Σdeg = 2E
- tree edges = n − 1
- bytes = fs × (bits/8) × ch × t
Practice questions
JPEG compression is
- lossy
- lossless
- none
- audio only
Show the answer
Answer: A. lossy Drops detail.
PNG compression is
- lossy
- lossless
- video only
- none
Show the answer
Answer: B. lossless Exact.
Vector graphics are made of
- pixels
- mathematical shapes
- audio
- cells only
Show the answer
Answer: B. mathematical shapes Scale cleanly.
Print colours use
- RGB
- CMYK
- HSV only
- ASCII
Show the answer
Answer: B. CMYK Inks.
CD audio sampling rate is
- 8 kHz
- 22 kHz
- 44.1 kHz
- 192 kHz
Show the answer
Answer: C. 44.1 kHz Standard.
The Turing test evaluates
- machine intelligence
- network speed
- disk errors
- battery
Show the answer
Answer: A. machine intelligence Imitation game.
The sum of vertex degrees equals
- E
- 2E
- V
- V + E
Show the answer
Answer: B. 2E Handshake lemma.
A tree with 10 vertices has edges
- 9
- 10
- 11
- 20
Show the answer
Answer: A. 9 n − 1.
An Euler circuit requires all vertex degrees to be
- even
- odd
- zero
- prime
Show the answer
Answer: A. even Connected graph.
A* search uses
- a heuristic
- only random moves
- no costs
- no graph
Show the answer
Answer: A. a heuristic f = g + h.
The practice questions were written for this studio; they are not copied from ASTU papers. ASTU publishes no topic syllabus for these exams, so the topics are an informed guide based on diploma courses, not an official list.