All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Never consecutive (Posted on 2021-01-26) Difficulty: 4 of 5
Given d dice each with n sides, find the probability that when they are rolled at once, there are no two consecutive numbers.

This task may be quite difficult. For a warm-up, try finding the numerators for fixed d such as {1,2,3} or for fixed n such as {2,3,4}.

Note 1: I don't have a formula so much as an algorithm.
Note 2: This problem arose as an attempt to solve http://perplexus.info/show.php?pid=12342 by Larry which uses non-independent cards instead of dice.

No Solution Yet Submitted by Jer    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts by algorithm | Comment 3 of 7 |
(In reply to simulations for comparison by Charlie)

clc
global sides dice fail succ die

for sides=2:10
    fprintf('%3d ',sides)
    for dice=2:6
        die=zeros(1,dice);
        succ=0; fail=0;
        addOn(1)
        prob=succ/(succ+fail);
        fprintf('%3d %8.6f ',dice,prob)
    end
    fprintf('\n')
end

function addOn(wh)
global sides dice die fail succ
for i=1:sides
   die(wh)=i; 
   if wh<dice
      addOn(wh+1)
   else
      s=sort(die);
      good=true;
      for j=1:dice-1
         if abs(s(j)-s(j+1))==1
            good=false;
            break
         end
      end
      if good
          succ=succ+1;
      else
          fail=fail+1;
      end
   end
end
end

  2   2 0.500000   3 0.250000   4 0.125000   5 0.062500   6 0.031250 
  3   2 0.555556   3 0.333333   4 0.209877   5 0.135802   6 0.089163 
  4   2 0.625000   3 0.343750   4 0.179688   5 0.091797   6 0.046387 
  5   2 0.680000   3 0.376000   4 0.200000   5 0.107200   6 0.058688 
  6   2 0.722222   3 0.416667   4 0.223765   5 0.116512   6 0.059714 
  7   2 0.755102   3 0.457726   4 0.250312   5 0.130719   6 0.067123 
  8   2 0.781250   3 0.496094   4 0.278809   5 0.147644   6 0.075951 
  9   2 0.802469   3 0.530864   4 0.308032   5 0.166286   6 0.086265 
 10   2 0.820000   3 0.562000   4 0.337000   5 0.186100   6 0.097882 
 
and four 5-sided dice yields 125/625 = 1/5.

  Posted by Charlie on 2021-01-26 11:54:00
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (8)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information