blob: 96512e9237326ecf97d6262abd1b9f8e4fef3ee3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-discuss] Randomised game position (was: Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected)
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20Randomised%20game%20position%20%28was%3A%20Mageia%202%20Wireless%0A%09LAN%20%28Wifi%29%20Connection%20Keeps%20Getting%20Disconnected%29&In-Reply-To=%3C1987973.SXHL93yTCA%40pip.chuzzlewit.co.uk%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="008424.html">
<LINK REL="Next" HREF="008425.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-discuss] Randomised game position (was: Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected)</H1>
<B>Deri James</B>
<A HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20Randomised%20game%20position%20%28was%3A%20Mageia%202%20Wireless%0A%09LAN%20%28Wifi%29%20Connection%20Keeps%20Getting%20Disconnected%29&In-Reply-To=%3C1987973.SXHL93yTCA%40pip.chuzzlewit.co.uk%3E"
TITLE="[Mageia-discuss] Randomised game position (was: Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected)">deri at chuzzlewit.myzen.co.uk
</A><BR>
<I>Fri Aug 10 11:37:28 CEST 2012</I>
<P><UL>
<LI>Previous message: <A HREF="008424.html">[Mageia-discuss] Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected
</A></li>
<LI>Next message: <A HREF="008425.html">[Mageia-discuss] Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8427">[ date ]</a>
<a href="thread.html#8427">[ thread ]</a>
<a href="subject.html#8427">[ subject ]</a>
<a href="author.html#8427">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On Friday 10 Aug 2012 09:58:45 RICHARD WALKER wrote:
><i> Do you know those little plastic squares with 24 alphabet tiles in a
</I>><i> 5x5 grid? The idea is to push the tiles around until you have them in
</I>><i> alphabetic order left to right, top to bottom, with an empty square in
</I>><i> the bottom right corner.
</I>><i>
</I>><i> Back in the mid-eighties I wrote a version of this game for my
</I>><i> Sinclair QL. I stored the tiles in a one-dimension array where they
</I>><i> were initially shuffled.
</I>><i>
</I>><i> I discovered, after much trial and error, that the chances of being
</I>><i> able to solve the puzzle after shuffling is almost exactly 1 in 2. The
</I>><i> problem is that 50% of shuffles results in an order where, by the
</I>><i> rules of tile movement, two adjacent tiles must be exchanged - and
</I>><i> that is not possible.
</I>><i>
</I>><i> Any ideas how to test the shuffled result to determine if such a
</I>><i> transposition exists without solving the game?
</I>><i>
</I>
One solution is not to randomise the array, but start from the solved position
and do 50 random (but legal) moves. This will leave a position from which you
can guarantee there is at least one solution (the reverse of the 50 random
moves).
Cheers
Deri
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="008424.html">[Mageia-discuss] Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected
</A></li>
<LI>Next message: <A HREF="008425.html">[Mageia-discuss] Mageia 2 Wireless LAN (Wifi) Connection Keeps Getting Disconnected
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#8427">[ date ]</a>
<a href="thread.html#8427">[ thread ]</a>
<a href="subject.html#8427">[ subject ]</a>
<a href="author.html#8427">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-discuss">More information about the Mageia-discuss
mailing list</a><br>
</body></html>
|