Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2013-06-10 07:03:14

hilikportezlina
Member
Registered: 2013-06-10
Posts: 2

Creating words by weights

You are given N weights, the first weighs 1 pound, the second 2 pounds, and so on (the N weight weighs N pounds)ץ
You are given an N-binary-word that's formed by L's and R's and scales.
You need to provide an algorithm of N steps, which in each step puts a weight on on of the scales (the left or the right one), and that in the i-th step the scales will lean left if the i-th letter in the word is L and will lean right if it's R.

for example: if N=3 and the word is LLR then the algorithm should say:
1. put 2 on the left scale
2. put 1 on the right scale (the scales will still lean to the left)
3. put 3 on the right scale

Offline

#2 2013-06-11 16:25:35

mathaholic
Member
From: Juliania
Registered: 2012-11-29
Posts: 2,797
Website

Re: Creating words by weights

Hi hilikportzelina, I don't get it. And, is this a game?


"Double the fun, double the thrill, double the coolness" - Julianthewiki

Offline

#3 2013-06-11 17:29:32

hilikportezlina
Member
Registered: 2013-06-10
Posts: 2

Re: Creating words by weights

no, it is not a game, it's a riddle or a puzzle. You need to find the algorithm

Offline

Board footer

Powered by FluxBB