Absorption Costing Variable Costing, Lecture notes of Ethics

3. Under absorption costing, profits are affected by both sales and production. If production exceeds sales, then a portion of the fixed manufacturing overhead ...

Typology: Lecture notes

2021/2022

Uploaded on 07/04/2022

Meesx
Meesx 🇳🇱

4.2

(9)

190 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Algorithms
6.046J/18.401
Lecture 23
Prof. Piotr Indyk

Proof (completed)
Q. How$many$ha’s$cause$x$and$y$to$collide?$
A. There$are$m$choices$for$each$of$a1,$a2,$…,$ar$,$
but$once$these$are$chosen,$exactly$one$choice$
for$a0$ causes$x$and$y$to$collide,$namely$
r
(x0 y
0
)1
= ai (xi y
i ) mod$m$
.
a0$
i$ 1
=
Thus,$the$number$of$h$’s$that$cause$x$and$y
a
to$collide$is$mr$·1$=$mr$ =$|H|/m.$
October$5,$2005$ Copyright$©$2001-5$by$Erik$D.$Demaine$and$Charles$E.$Leiserson$ L7.15$
Proof (completed)
Q. How$many$ha’s$cause$x$and$y$to$collide?$
A. There$are$m$choices$for$each$of$a1,$a2,$…,$ar$,$
but$once$these$are$chosen,$exactly$one$choice$
for$a0$ causes$x$and$y$to$collide,$namely$
r
(x0 y
0
)1
= ai (xi y
i ) mod$m$
.
a0$
i$ 1
=
Thus,$the$number$of$h$’s$that$cause$x$and$y
a
to$collide$is$mr$·1$=$mr$ =$|H|/m.$
October$5,$2005$ Copyright$©$2001-5$by$Erik$D.$Demaine$and$Charles$E.$Leiserson$ L7.15$
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Absorption Costing Variable Costing and more Lecture notes Ethics in PDF only on Docsity!

Introduction to Algorithms

6.046J/18.

Lecture 23

Prof. Piotr Indyk

         Proof (compl Q. How many h a ’s cause A. There are m choices f but once these are cho any h a ’s cause x and y to co re m choices for each of a ,

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. P vs NP (interconnectedness of all things)

  • A whole course by itself
  • We’ll do just two lectures
  • More in 6.045, 6.840J, etc.         

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. Example difficult problem

  • Traveling Salesperson Problem (TSP) - Input: undirected graph with lengths on edges - Output: shortest tour that visits each vertex exactly once
  • Best known algorithm: O(n 2 n ) time.

    %"(&(.'(&#$ 2 &,(  2  /'#%) &&) 



%

(!,)(. !

!

2 ) 5+'+* /4%1)+  5 & /'#%)1

  • * !

!

(!,1 2 )"%&-%#&(! $ 

% $!$ 3!&(%."         $(     

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. Another difficult problem

  • Clique:
    • Input: undirected graph

G=(V,E)

  • Output: largest subset C

of V such that every pair

of vertices in C has an

edge between them

  • Best known algorithm:

O(n 2

n

) time

Boolean Formula Satififiability Problem (SAT):

Given a Boolean formula F(X 1 , X 2 , ..., Xn) with n Boolean variables X 1 , X 2 , ..., Xn. SAT Problem: Determine if there is an trueth assignment of the n Boolean variables to 0(false) or 1(true) that makes the formula F =1(true). Example F = (X 1 V ¬X 2 V X 3 ) ∧ (X 2 V ¬X 3 V ¬X 5 )

       * %%    - ' "&# - )!# #

  • #) -## #%( #  ($
  • ,  $ %'! ) % #% + %#)         # 

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. What can we do?

  • Prove there is no polynomial time algorithm for those problems - Would be great - Seems really difficult - Best lower bounds for “natural” problems:
  • Spend more time and money designing efficient algorithms for those problems –People tried for a few decades, no luck –Outstanding $1000,000 prize for finding one –It seems very likely that such algorithms do not exist
  • (n 2 ) for restricted computational models
  • (n) for unrestricted computational models

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. What else can we do?

  • Show that those hard problems are

essentially equivalent.

I.e., if we can solve one of them in poly

time, then all others can be solved in poly

time as well.

  • Works for at least few thousand hard

problems

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. A more realistic scenario

  • Once an exponential lower bound is shown for one problem, it holds for all of them
  • But someone is happy… Ron Rivest

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. Summing up

  • If we show that a problem  is equivalent to a few thousand other well studied problems without efficient algorithms, then we get a very strong evidence that  is hard.
  • We need to:
    1. Identify the class of problems of interest
    2. Define the notion of equivalence
    3. Prove the equivalence(s)

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20.

1. Class of problems: NP

  • A problem  is solvable in poly time (or P), if there is a poly time algorithm V(.) such that for any input x: (x)=YES iff V(x)=YES
  • A problem  is solvable in non-deterministic poly time (or NP), if there is a poly time algorithm V(. , .) such that for any input x: (x)=YES iff there exists a certificate y of size poly(|x|) such that V(x,y)=YES

Nondeterministic Time (NP):

Deterministic Time (P):

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. Examples of problems in NP

  • Is “Does there exist a clique in G of size K” in NP? Yes: V(x,y) interprets x as a graph G, y as a set C, and checks if all vertices in C are adjacent and if |C|K
  • Is Sorting in NP? No, not a decision problem.
  • Is “Sortedness” in NP? Yes: ignore y, and check if the input x is sorted.

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20.

2. Reductions (formally)

  • ’ is poly time reducible to  ( ’   ) iff there is a poly time function f that maps inputs x’ to ’ into inputs x of , such that for any x’ ’(x’)=(f(x’))
  • Fact 1: if P and ’   then ’P
  • Fact 2: if NP and ’   then ’NP
  • Fact 3: if ’   and ”  ’ then ”  

Polynomial Time Reductions

between Problem Classes:

© Piotr Indyk Introduction to Algorithms May 6, 2008 L20. Summing up

  • If we show that a problem  is equivalent to a few thousand other well studied problems without efficient algorithms, then we get a very strong evidence that  is hard.
  • We need to:
    1. Identify the class of problems of interest
    2. Define the notion of equivalence
    3. Prove the equivalence(s) Two Problems are Polynomial Time Equivalent: if there Polynomial Time Reductions between the two problems