### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Tantalizer 452: Snailspaces | |

Brian Gladman on Enigma 1061: Par is never… | |

Hugh Casement on Enigma 1061: Par is never… | |

Jim Randell on Enigma 1061: Par is never… | |

geoffrounce on Puzzle 47: Digits all wro… |

### Archives

### Categories

- article (11)
- enigma (1,175)
- misc (2)
- project euler (2)
- puzzle (44)
- site news (46)
- tantalizer (48)
- teaser (3)

### Site Stats

- 183,007 hits

Advertisements

This is a bit similar to

Enigma 1344, in that they are both about pairing up members of distinct sets. This Python program constructs all parings (using thepartitions()function fromenigma.py, originally created forEnigma 1449but useful in several puzzles) and counts how many satisfy the conditions for each part of the problem. It runs in 54msSolution:(1) 8/35; (2) 3/35.Here is a program that determines the solution analytically. I used the

pairs()function from my solution to Enigma 1344. It agrees with the solution produced by the constructive approach and runs in 51ms.This enigma is much easier and quicker to do just by analysis.