SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
In this question, we'll modify the cost of flipping a bit in the k-bit counter discussed in the
lectures. Suppose instead of incurring a cost of 1 to flip a bit, for this question the cost to flip a
bit is dependent on the position of the bit is given by: flipping the ith bit (or equivalently bit i ),
for i0, incurs a cost of i. Assume the bits are labelled from 0 to k1, where bit 0 is the least
significant bit, while bit k1 is the most significant bit. For example, for k=4, going from 0000 to
0001 costs nothing, going from 0001 to 0010 costs 1 , going from 0111 to 1000 incurs a cost of
0+1+2+3=6 because it costs 0 to flip bit 0,1 to flip bit 1 , and 2 to bit 2 , and 3 to flip bit 3. Using
the method of aggregate analysis, with the counter initialized to 000..0 (zero), show that n
increments of the counter incurs a total cost of at most 4n. Hint: It may be helpful to apply one of
the following. n=0nxn1=(1x)21 and n=0nxn=(1x)2x, for x<1

Más contenido relacionado

Más de ALANKARSTEELINDUSTRI

Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
ALANKARSTEELINDUSTRI
 
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
 JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
ALANKARSTEELINDUSTRI
 

Más de ALANKARSTEELINDUSTRI (20)

Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdf
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdf
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdf
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdf
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdf
 
Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
 Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
Kamada CIA Japan (A). Takeshi Kamada, a foreign exchange trader .pdf
 
Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
 Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
Jouralize Be folowing bond traersacione (i) (Cack the icon to view it.pdf
 
JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
 JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
JD Dorian paid $1,000 of interest on a loan that paid tuition for him.pdf
 
Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
 Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
Jenny (15 years old) is one of two beneficiaries of Trust B created.pdf
 
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
 JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
JCL Inc. Is a major chip manufacturing firm that sells its products t.pdf
 
In the register there is a prolonged open phase. A. modal; falsetto B.pdf
 In the register there is a prolonged open phase. A. modal; falsetto B.pdf In the register there is a prolonged open phase. A. modal; falsetto B.pdf
In the register there is a prolonged open phase. A. modal; falsetto B.pdf
 
J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
 J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
J. Altman, BJ Everitt, TW Robbins, S. Glautier, A. Markou, D. Nutt..pdf
 
Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
 Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
Ivanhoe Limited follows ASPE, and the company sponsors a defined bene.pdf
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

In this question, well modify the cost of flipping a bit in the k-bi.pdf

  • 1. In this question, we'll modify the cost of flipping a bit in the k-bit counter discussed in the lectures. Suppose instead of incurring a cost of 1 to flip a bit, for this question the cost to flip a bit is dependent on the position of the bit is given by: flipping the ith bit (or equivalently bit i ), for i0, incurs a cost of i. Assume the bits are labelled from 0 to k1, where bit 0 is the least significant bit, while bit k1 is the most significant bit. For example, for k=4, going from 0000 to 0001 costs nothing, going from 0001 to 0010 costs 1 , going from 0111 to 1000 incurs a cost of 0+1+2+3=6 because it costs 0 to flip bit 0,1 to flip bit 1 , and 2 to bit 2 , and 3 to flip bit 3. Using the method of aggregate analysis, with the counter initialized to 000..0 (zero), show that n increments of the counter incurs a total cost of at most 4n. Hint: It may be helpful to apply one of the following. n=0nxn1=(1x)21 and n=0nxn=(1x)2x, for x<1