Each tile has an unique ID number. Each tile is a 10x10 grid of characters.

Each image tile has been rotated and flipped to a random orientation. Your first task is to reassemble the original image by orienting the tiles so they fit together.

To show how the tiles should be reassembled, each tile's image data includes a border that should line up exactly with its adjacent tiles. All tiles have this border, and the border lines up exactly when the tiles are both oriented correctly. Tiles at the edge of the image also have this border, but the outermost edges won't line up with any other tiles.

For example, suppose you have the following nine tiles:

Tile 2311: ..##.#..#. ##..#..... #...##..#. ####.#...# ##.##.###. ##...#.### .#.#.#..## ..#....#.. ###...#.#. ..###..### Tile 1951: #.##...##. #.####...# .....#..## #...###### .##.#....# .###.##### ###.##.##. .###....#. ..#.#..#.# #...##.#.. Tile 1171: ####...##. #..##.#..# ##.#..#.#. .###.####. ..###.#### .##....##. .#...####. #.##.####. ####..#... .....##... Tile 1427: ###.##.#.. .#..#.##.. .#.##.#..# #.#.#.##.# ....#...## ...##..##. ...#.##### .#.####.#. ..#..###.# ..##.#..#. Tile 1489: ##.#.#.... ..##...#.. .##..##... ..#...#... #####...#. #..#.#.#.# ...#.#.#.. ##.#...##. ..##.##.## ###.##.#.. Tile 2473: #....####. #..#.##... #.##..#... ######.#.# .#...#.#.# .######### .###.#..#. ########.# ##...##.#. ..###.#.#. Tile 2971: ..#.#....# #...###... #.#.###... ##.##..#.. .#####..## .#..####.# #..#.#..#. ..####.### ..#.#.###. ...#.#.#.# Tile 2729: ...#.#.#.# ####.#.... ..#.#..... ....#..#.# .##..##.#. .#.####... ####.#.#.. ##.####... ##..#.##.. #.##...##. Tile 3079: #.#.#####. .#..###### ..#....... ######.... ####.#..#. .#...#.##. #.#####.## ..#.###... ..#....... ..#.###...

## VP 30.1: Counting Hash Marks (5 pts)

Use this data:https://samsclass.info/COMSC132/proj/VP30Count the hash marks(#) in all the images. That total number is the flag.

Read the top edge as a binary number, treating a period as zero and a hashmark as 1. You get:

..##.#..#. ##..#..... #...##..#. ####.#...# ##.##.###. ##...#.### .#.#.#..## ..#....#.. ###...#.#. ..###..###

Now do the same for the right edge, the bottom, and the left edge, reading in a clockwise direction. You get:

Top = ..##.#..#. 0011010010 = 210

Now turn the tile over, rotating it about a vertical axis, and construct the new edge numbers, as shown below:

Right = ...#.##..# 0001011001 = 89 Bottom = ###..###.. 1110011100 = 924 Left = .#..#####. 0100111110 = 318

There are 8 edge numbers per tile.

Flipped: Tile: 2311 .#..#.##.. .....#..## .#..##...# #...#.#### .###.##.## ###.#...## ##..#.#.#. ..#....#.. .#.#...### ###..###.. Edges: [300, 498, 231, 616]

The sample data above contains nine tiles, so there are 72 edges.

Adding all those edges together results in 29496.

## VP 30.2: Edge Numbers (10 pts)

Use this data:Find the total of all the edge numbers, as explained above.https://samsclass.info/COMSC132/proj/VP30That's the flag.

Asterisks mark the edge numbers with matches in other tiles.

------------------------------------------------------------------- | Tile: 2311 | Tile: 1951 | Tile: 1171 | | | | | | (210*, 300*) | (710*, 397*) | (966*, 399*) | |(318*, ( 89*,|(587 , (498*,|(391 , (288*,| | 616*) 498*)| 318*) 841 )| 18*) 902 )| | (924 , 231 ) | (177 , 564 ) | ( 96 , 24 ) | ------------------------------------------------------------------- | Tile: 1427 | Tile: 1489 | Tile: 2473 | | | | | | (948*, 183*) | (848 , 43 ) | (542 , 481 ) | |( 9*, (234*,|(689*, ( 18*,|(399*, (116*,| | 348*) 576*)| 288*) 565*)| 184*) 966*)| | (300*, 210*) | (183*, 948*) | (348*, 234*) | ------------------------------------------------------------------- | Tile: 2971 | Tile: 2729 | Tile: 3079 | | | | | | (161 , 532 ) | ( 85*, 680*) | (702 , 501 ) | |( 78 , (565*,|(962 , (576*,|( 89*, (264 ,| | 689*) 456 )| 9*) 271 )| 66 ) 616*)| | (680*, 85*) | (397*, 710*) | (116*, 184*) | -------------------------------------------------------------------

There are three possibilities:

- Two edges match: this tile must be on a
**corner**of the grid - Three edges match: tile must be on a
**side**of the grid - Four edges match: this tile must be
**inside**the grid

Corners: [1951, 1171, 2971, 3079] Sides: [2311, 1489, 2473, 2729] Insides: [1427]

## VP 30.3: Corners (10 pts extra)

Use this data:Find the four corner tiles. Multiply their IDs together.https://samsclass.info/COMSC132/proj/VP30That's the flag.

Rotate it as needed to put the outside edges on the outside.

Then fill in the grid with the other tiles.

By rotating, flipping, and rearranging them, you can find a square arrangement that causes all adjacent borders to line up, as shown below. Your solution may have the entire grid rotated or flipped, but that's OK as long as the tile edges match.

For reference, the IDs of the above tiles are:

#...##.#.. ..###..### #.#.#####. ..#.#..#.# ###...#.#. .#..###### .###....#. ..#....#.. ..#....... ###.##.##. .#.#.#..## ######.... .###.##### ##...#.### ####.#..#. .##.#....# ##.##.###. .#...#.##. #...###### ####.#...# #.#####.## .....#..## #...##..#. ..#.###... #.####...# ##..#..... ..#....... #.##...##. ..##.#..#. ..#.###... #.##...##. ..##.#..#. ..#.###... ##..#.##.. ..#..###.# ##.##....# ##.####... .#.####.#. ..#.###..# ####.#.#.. ...#.##### ###.#..### .#.####... ...##..##. .######.## .##..##.#. ....#...## #.#.#.#... ....#..#.# #.#.#.##.# #.###.###. ..#.#..... .#.##.#..# #.###.##.. ####.#.... .#..#.##.. .######... ...#.#.#.# ###.##.#.. .##...#### ...#.#.#.# ###.##.#.. .##...#### ..#.#.###. ..##.##.## #..#.##..# ..####.### ##.#...##. .#.#..#.## #..#.#..#. ...#.#.#.. .####.###. .#..####.# #..#.#.#.# ####.###.. .#####..## #####...#. .##....##. ##.##..#.. ..#...#... .####...#. #.#.###... .##..##... .####.##.# #...###... ..##...#.. ...#..#### ..#.#....# ##.#.#.... ...##.....

To find the flag, add the tile ID numbers along the main diagonals, like this:

1951 2311 3079 2729 1427 2473 2971 1489 1171

1951 + 1427 + 1171 + 3079 + 2971 = 10599

## VP 30.4: Assembling the Grid (50 pts extra)

Use this data:There are 144 tiles. Assemble them into a 12x12 grid, with all the tile edges matching.https://samsclass.info/COMSC132/proj/VP30Add the tile ID numbers along the main diagonals, as explained above.

That's the flag.

Posted 10-3-24

Video added 10-9-24

Flag VP 30.2 verified 10-21-24