My Math Forum Calculating amount left at the end of a repetitive cutting down cycle.

 Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion

 May 26th, 2019, 12:01 AM #1 Newbie   Joined: May 2019 From: Australia Posts: 8 Thanks: 0 Calculating amount left at the end of a repetitive cutting down cycle. Let's say I have a group of X's characters that I want to cut down. I use a tool similar to 'find-and-replace-all', which takes an amount of X's each time, deletes them, and replaces them with another, smaller amount. For example, I can state that I want an amount of 8 X's to be replaced with 5 X's from an original amount of 14 X's. This cycle happens forever, or until there isn't a sufficient remainder left to replace anymore. To visualise the example I just provided: (XXXXXXXX)XXXXXX --> [XXXXX]XXXXXX (XXXXXXXX)XXX --> [XXXXX]XXX (XXXXXXXX) --> [XXXXX] So, you start with 14 X's and end with 5 X's, and the process carried out here can be summarised as '14, 11, 8, 5'. The process that was underwent in terms of finding and replacing can be described as (8,5) as 8 X's are replaced with 5 each time. Now, the question here is: 1. When you initially have a string of 1,000,000 X's, and apply the find-and-replace process of (99,90), what is the summary of the process here? By summary of the process, I mean the '14, 11, 8, 5' which shows how many X's are left after each step. I tried solving this manually, starting the process summary as '1,000,000, 909,091, 826,453, 751,321, 683,020, 620,929, 564,481, 513,172, 466,525' however I realised this was a very inefficient way of solving this, and prone to mistakes. Can anyone help me do it in a better, easier way? ALSO FOLLOW UP QUESTION 2. For the (7,3) process, find all start lengths which eventually result in an end length of 6. I can see 10 being applicable for this, however manual testing every number to find a suitable match is also quite inefficient. If you can help me for this question too, please do. Also, please explain in more simple math terms, rather than using symbols (as I am still a beginner) Thank you!
 May 26th, 2019, 01:35 AM #2 Global Moderator   Joined: Dec 2006 Posts: 21,028 Thanks: 2259 For the (a, b) process, where a - b = d > 0, if the initial string has length c > a - 1, the summary is 'c, c - d, ...' continuing until a value less than a is obtained. If c < a, the summary is 'c'. Hence the (7, 3) process ends in 6 only if the initial length is 6 or 10 or 14 or 18 etc. Thanks from Zekes
May 26th, 2019, 02:01 AM   #3
Newbie

Joined: May 2019
From: Australia

Posts: 8
Thanks: 0

Quote:
 Originally Posted by skipjack For the (a, b) process, where a - b = d > 0, if the initial string has length c > a - 1, the summary is 'c, c - d, ...' continuing until a value less than a is obtained. If c < a, the summary is 'c'. Hence the (7, 3) process ends in 6 only if the initial length is 6 or 10 or 14 or 18 etc.
I don't understand what the pronumerals 'c' and 'd' stand for.

 May 26th, 2019, 04:40 AM #4 Global Moderator   Joined: Dec 2006 Posts: 21,028 Thanks: 2259 I defined c to be the length of the initial string, and d to be a - b, where the process is (a, b). I could have used other letters, but it seemed reasonable to use letters chosen in alphabetical order.
May 26th, 2019, 04:44 AM   #5
Newbie

Joined: May 2019
From: Australia

Posts: 8
Thanks: 0

Quote:
 Originally Posted by skipjack I defined c to be the length of the initial string, and d to be a - b, where the process is (a, b). I could have used other letters, but it seemed reasonable to use letters chosen in alphabetical order.
Ok thank you! Could you also possibly help me with the first part?

 May 26th, 2019, 09:07 AM #6 Global Moderator   Joined: Dec 2006 Posts: 21,028 Thanks: 2259 For part (1), c = 1,000,000 and d = 99 - 90 = 9. If just one string replacement is done at a time, the process is (1000000, 999991, 999982, ... 199, 190, 181, 172, 163, 154, 145, 136, 127, 118, 109, 100, 91). If multiple replacements are done at a time, the process shortens to '1000000, 909091, 826453, 751321, 683020, 620929,564481, 513172, 466525, 424117, ... 199, 181, 172, 163, 154, 145, 136, 127, 118, 109, 100, 91', in which the last 11 values are the same as before. Thanks from Zekes

 Tags amount, calculating, cutting, cycle, end, left, repetetive, repetitive

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post Monox D. I-Fly Elementary Math 14 August 16th, 2014 05:42 AM LordHertz New Users 17 July 7th, 2014 09:32 AM r-soy Physics 0 June 2nd, 2013 02:14 AM Phil1892 Algebra 1 June 28th, 2011 04:54 PM monicao Applied Math 1 November 27th, 2009 10:31 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top