Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

/prog/ Challenge #90909 - Geometry&Primes

Name: Anonymous 2014-02-27 16:30

WRITE A PROGRAM, in any language, that accepts a positive integer greater than two which represents the number of sides of a tileable polygon. With this shape, create a graph of the specified polygons such that the polygons are generated in a spiral traveling counter-clockwise. Each polygon should be given a nonnegative integer value. Identify the primes, greater than 2, in the graph and return the set of prime polygons that are touching in any direction. The program should search the entire graph up to 1,000,000 polygons.

FOR EXAMPLE: The primes connected in a graph of 4 below 55
__ __ __ __ __ __ __ __            __ __ __ __ __ __ __ __
|36|35|34|33|32|31|30|55|          |  |  |  |  |  |31|  |  |
 __ __ __ __ __ __ __ __            __ __ __ __ __ __ __ __ 
|37|16|15|14|13|12|29|54|          |37|  |  |  |13|  |29|  |
 __ __ __ __ __ __ __ __            __ __ __ __ __ __ __ __ 
|38|17| 4| 3| 2|11|28|53|          |  |17|  | 3| 2|11|  |53|
 __ __ __ __ __ __ __ __     ->     __ __ __ __ __ __ __ __ 
|39|18| 5| 0| 1|10|27|52|    ->    |  |  | 5|  |  |  |  |  |
 __ __ __ __ __ __ __ __            __ __ __ __ __ __ __ __ 
|40|19| 6| 7| 8| 9|26|51|          |  |19|  | 7|  |  |  |  |
 __ __ __ __ __ __ __ __            __ __ __ __ __ __ __ __ 
|41|20|21|22|23|24|25|50|          |41|  |  |  |23|  |  |  |
 __ __ __ __ __ __ __ __            __ __ __ __ __ __ __ __ 
|42|43|44|45|46|47|48|49|          |  |43|  |  |  |47|  |  |

The returned sets of this example should be {5,7,17,23,37,47}, {3,5,13,19,31,41}, {41,43}, {11, 13}, {11, 29}, and {29, 31, 53}.


DEADLINE: The windows for submissions extends until forever minus one day. Entries will be judged on the last day of eternity and prizes awarded one week after that. No late submissions will be accepted.

JUDGING CRITERIA: Entries will be judged in several ways and awarded points based the following rubric:
Accuracy - maximum 2000 points
Efficiency (based on implementation, not execution speed)- maximum 1500 points
Formal correctness - maximum 500 points
Readability - maximum 500 points
Elegance of solution - maximum 500 points

Generalized to higher dimensions - 10000 point bonus
Included one as a prime - 100000 point penalty

PRIZES:
First place - A promise to pay you 50 BTC just as soon as MtGox is solvent again.
Second place - 50,000 cute images of 2hus, garuanteed at least 90% non-lewd.
Third place - A JPEG of a participation ribbon.

Name: Anonymous 2014-02-27 16:54

Y U NO RETURN {3, 2, 11}?

Name: Anonymous 2014-02-27 17:13

Senseiii these number hurt my head!

Name: Anonymous 2014-02-27 17:19

this is bullshit

Name: Anonymous 2014-02-27 17:53

>>2
Identify the primes, greater than 2, in the graph

Name: Anonymous 2014-02-27 18:57

>>1
I will submit my solution in 10 years

Name: Anonymous 2014-02-27 19:37

1. Will there only be regular tilings?
2. What does a tiling of a 2D polygon look like in higher dimensions?  Will it be a regular tiling of a Platonic solid formed from the 2D polygon?
3. What does a spiral look like in higher dimensions?  Which axis will it be rotating along?

Name: Anonymous 2014-02-28 3:09

What is the standard behavior for deciding the next polygon to assign a in an tesselation?

I'm going to assume that the next shape is the touching polygon with the shortest distance from the original shape.

Name: Anonymous 2014-02-28 4:56

Second place - 50,000 cute images of 2hus, garuanteed at least 90% non-lewd.

Are you one of those pedophiles fapping to Chinese powerpuff girls?

Name: Anonymous 2014-02-28 5:12

Why polygons if they need to be in straight lines?

Name: Anonymous 2014-02-28 5:18

also, 1d polygons?

Name: Anonymous 2014-02-28 8:16

>>9
cute not pedo

Name: Anonymous 2014-02-28 9:01

>>12
pedo not cute

Name: Anonymous 2014-02-28 9:09

>>13
no you are wrong, it's not my fault you can't look at young girls and not imagine yourself having sex with them, freaking pedo

Name: Anonymous 2014-02-28 9:50

cut the crap
if you're a grown up man and you watch hentai, kawai, touhou, lolicon or any of the other pedophile animes you're a pedo
deal with it

Name: Anonymous 2014-02-28 10:50

>>10,11
Back to middle school, please!

>>12-15
Back to /g/, please!

Name: Anonymous 2014-02-28 11:31

>>16
fuck off back to /pedo/rider

Name: Anonymous 2014-02-28 12:27

>>1
in any language,
Alright!
#lang s-exp "my-poly-tiling-lang.rkt"
(count-primes n)

Name: Anonymous 2014-02-28 12:40

>>16
Back to /pedo/rider please!

Name: Anonymous 2014-02-28 12:50

>>16
That's just lel-cunt doing his thing, don't kind him!

Name: Anonymous 2014-02-28 12:51

>>20
*mind

I'm so embarassed!

Name: Anonymous 2014-02-28 12:56

>>20
who the fuck is lel-cunt?

Name: Anonymous 2014-02-28 12:57

>>15
le homosexphile criticism

Name: Anonymous 2014-02-28 13:02

>>22
Hello new-fag! :-)

I see you got doubles. Pretty good for a new-fag ;-)

Name: Anonymous 2014-02-28 18:58

Wolfram[Interpret[/progshit/]]

Name: Anonymous 2014-02-28 19:19

>>24
IM A NEWFAG WITH A LOT OF #SWAG

Don't change these.
Name: Email:
Entire Thread Thread List