mscroggs.co.uk
mscroggs.co.uk

subscribe

Comment

Comments

Comments in green were written by me. Comments in blue were not written by me.
You can solve the Dec 21 puzzle using the principle of inclusion/exclusion:

-There are 6! total ways of arranging 6 numbers.
-Now we have to exclude the ones that don't fit. How many ways have 2 following 1? You can think of 12 as a pair, so you're arranging 12/3/4/5/6 in any order, so there are 5! ways to do this. And there are (5 choose 1)=5 total pairs that might exist, so there are 5*5! ways that have either 12, 23, 34, 45, or 56.
-Of course, we've double counted some that have more than one pair. (This is where inclusion/exclusion comes in, we have to include them back in). So how many have, say, 12 and 45? Well now we're arranging 12/3/45/6, so there are 4! ways to do so. There are (5 choose 2)=10 different pairs, so the double counting was 10*4!.
-We continue this on, and inclusion/exclusion says we keep alternating adding and subtracting as we add more pairs, so the answer is:
6!
- (5 choose 1) * 5!
+ (5 choose 2) * 4!
- (5 choose 3) * 3!
+ (5 choose 4) * 2!
- (5 choose 5) * 1!
= 309
Todd
on /blog/88
×6   ×4   ×3   ×3   ×3   

Archive

Show me a random blog post
 2026 

Feb 2026

Christmas (2025) is over
 2025 
▼ show ▼
 2024 
▼ show ▼
 2023 
▼ show ▼
 2022 
▼ show ▼
 2021 
▼ show ▼
 2020 
▼ show ▼
 2019 
▼ show ▼
 2018 
▼ show ▼
 2017 
▼ show ▼
 2016 
▼ show ▼
 2015 
▼ show ▼
 2014 
▼ show ▼
 2013 
▼ show ▼
 2012 
▼ show ▼

Tags

speed christmas mathsteroids wave scattering reddit dinosaurs gaussian elimination simultaneous equations menace martin gardner zines inline code pi manchester stickers crossnumbers christmas card guest posts rhombicuboctahedron data sobolev spaces nine men's morris cross stitch error bars polynomials mathsjam royal baby determinants arithmetic matrix of cofactors tennis latex bempp databet european cup pythagoras tmip puzzles dragon curves hannah fry platonic solids datasaurus dozen mathslogicbot world cup royal institution fractals palindromes runge's phenomenon hats crochet partridge puzzle javascript plastic ratio computational complexity electromagnetic field manchester science festival big internet math-off correlation fonts programming pac-man rust draughts game show probability bubble bobble alphabets warwick stirling numbers folding paper radio 4 hexapawn london squares london underground asteroids pi approximation day wool crossnumber bodmas flexagons errors interpolation geometry newcastle ternary dataset chebyshev football anscombe's quartet noughts and crosses friendly squares matrices quadrilaterals golden spiral estimation youtube triangles finite group trigonometry raspberry pi hyperbolic surfaces books php gerry anderson light sorting sound cambridge reuleaux polygons graph theory edinburgh 24 hour maths chess statistics coventry weather station chalkdust magazine graphs games recursion misleading statistics crosswords live stream bots braiding approximation countdown phd gather town logo fence posts matrix multiplication exponential growth final fantasy turtles binary probability talking maths in public geogebra logs pizza cutting nonograms finite element method curvature accuracy harriss spiral numbers the aperiodical people maths mean captain scarlet regular expressions golden ratio signorini conditions craft convergence dates map projections numerical analysis ucl thirteen inverse matrices kings sport folding tube maps go pascal's triangle game of life python rugby frobel coins machine learning news matrix of minors advent calendar matt parker propositional calculus logic a gamut of games realhats video games oeis national lottery kenilworth standard deviation weak imposition data visualisation preconditioning boundary element methods

Archive

Show me a random blog post
▼ show ▼
© Matthew Scroggs 2012–2026