Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

number of switches

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47479] number of switches
  • From: "fake" <fake at fake.it>
  • Date: Wed, 14 Apr 2004 07:16:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Consider the lists {1,1,0,1} and {1,1,0,0},{1,0,1,0,1}.
The first sequence (1101) switches 2 times (#2digit~#3digit,
#3digit~#4digit}, the second (1100) 1 time, the third 10101 4 times.

I have the following problem.
Consider a list of binary digits. Which is the easiest way to count the
number of switches of the list (using Mathematica commands)?


  • Prev by Date: Intra functional relations
  • Next by Date: Programmer/Modeller Wanted
  • Previous by thread: Re: Intra functional relations
  • Next by thread: Re: number of switches