3. }
// left subtree
int lmax4 =Math.min(max4, n.key -1);
int lmax3 =Math.min(max3, n.key -1);
assertMrgTraversal(n.left, low, lmax4, lmax3);
// right subtree
assertMrgTraversal(n.right, n.key +1, max4, max3);
}
publicvoid assertNodes(LLRB llrb,int max,int cons){
assertTraversal(llrb.root,1, max, cons);
}
privatevoid assertTraversal(LLRB.Node n,int low,int max,int co
ns){
if(n ==null){
assertTrue(low /4*4+4> max);
assertTrue(low > cons || low /4*4== cons);
return;
}
// left subtree
int lmax =Math.min(max, n.key -1);
int lcons =Math.min(cons, n.key -1);
assertTraversal(n.left, low, lmax, lcons);
// right subtree
assertTraversal(n.right, n.key +1, max, cons);
}
privatevoid testFix(){
LLRB llrb;
// Testing on valid red black trees
for(int i =0; i <128; i++){
llrb = rb.resetRandomTree(i);
assertTrue(testValid(llrb));
llrb.fixLLRB();
4. assertTrue(testValid(llrb));
}
// Testing on invalid red black trees
for(int i =0; i <128; i++){
for(int k =0; k <32; k++){
llrb = rb.resetRandomTree(i);
llrb.bstInsert(k *4+3);
if(llrb.isValidLLRB()){
llrb.bstInsert(k *4+2);// left invalid except when r
oot was null in rb
assertFalse(rb.depth >0&& testValid(llrb));
llrb.fixLLRB();
assertTrue(testValid(llrb));
llrb = rb.toLLRB();
llrb.bstInsert(k *4+2);
llrb.bstInsert(k *4+3);// right invalid
assertFalse(testValid(llrb));
llrb.fixLLRB();
assertTrue(testValid(llrb));
}else{// right invalid
llrb.fixLLRB();
assertTrue(testValid(llrb));
llrb.bstInsert(k *4+2);
llrb.bstInsert(k *4+1);// left invalid
assertFalse(testValid(llrb));
llrb.fixLLRB();
llrb.fixLLRB();
assertTrue(testValid(llrb));
}
}
}
}
privatevoid testMinBlackDepth(){
LLRB llrb;
5. // Testing on balanced red black trees
for(int i =0; i <128; i++){
llrb = rb.resetRandomTree(i);
for(int k =0; k <128; k++){
llrb.bstInsert(k);
// DEBUG : System.out.println("Verifying minimum black edge
count of tree for seed = " + i + " after red-
edged insertion of " + k + " is " + rb.depth);
assertEquals(rb.depth, llrb.minBlackEdgesDepth());
}
}
// Testing on unbalanced red black trees
for(int i =0; i <128; i++){
for(int k =0; k <96; k++){
rb.resetRandomTree(i);
int key = k /3*4+(k %3)+1;
rb.bstInsert(key,false);
// DEBUG : System.out.println("Verifying minimum black edge
count of tree for seed = " + i + " after black-
edged insertion of " + k + " is still " + rb.depth);
assertEquals(rb.depth ==0?1: rb.depth, rb.toLLRB().
minBlackEdgesDepth());
}
}
}
privatevoid testMaxBlackDepth(){
LLRB llrb;
// Testing on balanced red black trees
for(int i =0; i <128; i++){
llrb = rb.resetRandomTree(i);
for(int k =0; k <128; k++){
llrb.bstInsert(k);
// DEBUG : System.out.println("Verifying maximum black edge
count of tree for seed = " + i + " after red-
6. edged insertion of " + k + " is " + rb.depth);
assertEquals(rb.depth, llrb.maxBlackEdgesDepth());
}
}
// Testing on unbalanced red black trees
for(int i =0; i <128; i++){
for(int k =2; k <96; k++){
rb.resetRandomTree(i);
int key = k /3*4+(k %3)+1;
rb.bstInsert(key,false);
// DEBUG : System.out.println("Verifying maximum black edge
count of tree for seed = " + i + " after black-
edged insertion of " + k + " is " + (rb.depth + 1));
assertEquals(rb.depth +1, rb.toLLRB().maxBlackEdg
esDepth());
}
}
}
privatevoid testLeftRed(){
LLRB llrb;
// Testing on valid red black trees
for(int i =0; i <128; i++){
llrb = rb.resetRandomTree(i);
// DEBUG : System.out.println("Checking validity of tree for se
ed = " + i);
assertFalse(llrb.containsConsecutiveLeftRedEdges());
}
// Testing on invalid red black trees
for(int i =0; i <128; i++){
for(int k =0; k <32; k++){
rb.resetRandomTree(i);
rb.bstInsert(k *4+3,false);
rb.bstInsert(k *4+2,true);
7. rb.bstInsert(k *4+1,true);
// DEBUG : System.out.println("Checking invalidity of tree for
seed = " + i + " after inserting two edges on the left at " + (k * 4
+ 2) + " and " + (k * 4 + 1));
assertTrue(rb.toLLRB().containsConsecutiveLeftRed
Edges());
}
}
}
privatevoid testRightRed(){
LLRB llrb;
// Testing on valid red black trees
for(int i =0; i <128; i++){
llrb = rb.resetRandomTree(i);
// DEBUG : System.out.println("Checking validity of tree for se
ed = " + i);
assertFalse(llrb.containsRightRedEdge());
}
// Testing on invalid red black trees
for(int i =0; i <128; i++){
for(int k =0; k <32; k++){
rb.resetRandomTree(i);
rb.bstInsert(k *4+1,false);
rb.bstInsert(k *4+2,true);
// DEBUG : System.out.println("Checking invalidity of tree for
seed = " + i + " after inserting red edge on the right at " + (k * 4
+ 2));
assertTrue(rb.toLLRB().containsRightRedEdge());
}
}
}
privatevoid testIns(){
// Testing serial insertions into random red black trees
8. for(int i =0; i <128; i++){
// DEBUG : System.out.print("For seed = " + i + " inserting key
s :");
LLRB llrb = rb.resetRandomTree(i);
for(int k =0; k <96; k++){
int key = k /3*4+(k %3)+1;
// DEBUG : System.out.print(" " + key);
llrb.insert(key);
assertTrue(testValid(llrb));
assertNodes(llrb, rb.max, key);
}
// DEBUG : System.out.println("");
}
}
privatevoid testMethod(int method_id)throwsException{
try{
System.out.print(border + test + border);
switch(method_id){
case0: testIns();break;
case1: testRightRed();break;
case2: testLeftRed();break;
case3: testMaxBlackDepth();break;
case4: testMinBlackDepth();break;
case5: testFix();break;
}
}catch(AssertionError aerr){
ae = aerr;
}catch(Exception err){
e = err;
}
if(ae !=null|| e !=null){
System.out.print("n"+ border + test + failed + border);
System.out.println("failing case seed = "+ rb.seed +" and the co
rresponding tree:");
9. System.out.println(rb.toString());
if(ae !=null)throw ae;
if(e !=null)throw e;
}else{
System.out.print(border + test + passed + border);
}
}
@Test
publicvoid testFixLLRB()throwsException{
test ="* Testing fix LLRB *n";
testMethod(5);
}
@Test
publicvoid testMinBlackEdgesDepth()throwsException{
test ="* Testing minimum black edges depth *n";
testMethod(4);
}
@Test
publicvoid testMaxBlackEdgesDepth()throwsException{
test ="* Testing maximum black edges depth *n";
testMethod(3);
}
@Test
publicvoid testContainsConsecutiveLeftRedEdges()throwsExcep
tion{
test ="* Testing consecutive left red edges *n";
testMethod(2);
}
@Test
publicvoid testContainsRightRedEdge()throwsException{
test ="* Testing right red edge *n";
10. testMethod(1);
}
@Test
publicvoid testInsert()throwsException{
test ="* Testing insert *n";
testMethod(0);
COLLECTIVE BARGAINING EXERCISE
(100 POINTS)
I. READ THE FOLLOWING SITUATION AND CURRENT
CONTRACT PROVISIONS.
II. WRITE A PROPOSAL INDICATING WHAT YOUR TEAM
INTENDS TO OBTAIN
FOR EACH ISSUE. INCLUDE:
>> WHAT DOES YOUR TEAM THINK IS A REASONABLE
AMOUNT FOR EACH BARGAINING ISSUE? WHY??
>> WHAT ARE YOUR HIGH PRIORITY ITEMS? WHY??
>> WHAT ARE YOU WILLING TO TRADE IN EXCHANGE
FOR YOUR HIGH
PRIORITY ITEMS? WHY??
>> WHAT ISSUES IN ADDITION TO THE CURRENT
CONTRACT
PROVISIONS DO YOU PROPOSE? WHY??
11. (PROPOSALS = UP TO 40 POINTS, DUE APRIL 21, 2016)
III. NEGOTIATE A CONTRACT THAT IS ACCEPTABLE TO
BOTH PARTIES.
YOU MUST HAVE A CONTRACT SIGNED BY ALL
NEGOTIATING MEMBERS BY CLASS TIME, MAY 3, 2016).
IF AN IMPASSE IS REACHED HOWEVER, YOU MUST
FULLY EXPLAIN WHAT YOUR SIDE IS PLANNING TO DO.
A 25 POINT PENALTY IS ASSESSED IF THERE IS A
STRIKE OR LOCKOUT. CONTRACTS WILL BE GRADED
ON THEIR COMPLETENESS AND NEATNESS.
(CONTRACTS = UP TO 25 POINTS)
IV. EXPLAIN WHAT HAPPENED DURING YOUR
NEGOTIATIONS. THIS REPORT
SHOULD INCLUDE:
A. WHAT WERE THE HARDER ISSUES TO
NEGOTIATE? WHY?
B. WHAT WERE THE EASIER ISSUES TO NEGOTIATE?
WHY?
C. BASED ON HOW THIS CONTRACT TURNED
OUT, WHAT WOULD YOU ANTICIPATE HAPPENING
WHEN IT EXPIRES? WHAT ISSUES DID YOUR SIDE WIN?
LOSE? (BE SURE TO EXPLAIN WHY YOU WON OR LOST
ISSUES.) HOW WILL THESE AFFECT FUTURE CONTRACT
TALKS? WHY?
(REPORT = UP TO 15 POINTS, DUE WITH THE CONTRACT,
MAY 3, 2016
V. GROUP EVALUATION (20 POINTS BASED ON GROUP
AVERAGE RATING) (GROUPS MAY DISCHARGE
NONPERFORMING MEMBERS. TERMINATED MEMBERS
WILL RECEIVE A "0" FOR THE PROJECT. DUE MAY 3,
2016)
12. COLLECTIVE BARGAINING
The Melville Printing Company is a seventy year old printing
company located in a south central Kentucky. The company
manufactures a wide variety of items including brochures,
atlases, annual reports, and sales catalogs. Melville has always
enjoyed a reputation for high quality and reliability in meeting
delivery dates. The company employs 1241 skilled and semi-
skilled employees in addition to about 160 management and
staff personnel. The currently operate 24 hours per day, seven
days a week. The employees rotate on two 12 hour shifts (7 am
-7 pm and 7pm-7am).
The work force, consisting mainly of graphic arts, printing, and
typographical workers, was organized in 1966 by the
International Brotherhood of Printers (IBP). Labor-management
relations have generally been good, but some conflicts have
resulted in the past few years. While the company has not been
struck by IBP, the number of grievances and arbitration cases
has risen substantially in the past three years.
Historically, Melville held a sizeable share of the regional
market and enjoyed impressive profit margins. However, recent
competition has led to a gradual erosion in the past five years.
Competition is expected to increase, causing a great concern for
Melville's top management. The union has sympathized with
Melville's recent sales situation, but has let it be known that
they will fight for a considerably stronger contract than they
presently have. The company is still profitable with a stable
ROA of 4% and posted a net profit of $5,120,000 last year.
However, Management feels that it cannot afford to liberalize
the current contract to any significant extent. They may even
look for possible reductions or more cost sharing with respect to
benefits. The following reflects the current contract provisions.
The additional information provided comes mostly from a recent
pay survey of local employers considered to be in Melville’s
13. relevant labor market.
Last year’s total compensation for the non-exempt employees
covered by the contract was:
Hourly pay = $37,154,320
Overtime pay = $4,149,749
Benefits = $11,146,296
Your task is to negotiate a contract between the Melville
Printing Company and IBP.
CURRENT CONTRACT PROVISIONS
ISSUE
CURRENT CONTRACT PROVISIONS
ADDITIONAL INFORMATION
WAGES
Average wage = $12.05 PER HOUR
Range of $10.85 to $17.95 PER HOUR.
Shift differential of $.30 for night shift.
Wage rates for competing companies in the local area average
$14.35/hour, with a range of $8.75 to $19.75. Shift
differentials of shift, $.50 for nights.
OVERTIME
Premium pay of time and one half for all hours over 40 per
week. Also receive premium rate for Sundays and Holidays.
Each union employee averages 185 hours of overtime per year.
LAYOFF NOTICE
Minimum of 2 weeks advance notice for ANY layoff.
Five of the competing companies give 30 days notice. Eleven
14. others give 2 weeks. Another 6 companies surveyed give 60
days notice.
VACATION
Five days after 1 year of service.
Ten days for all employees with 2+ years of service.
Average union employee tenure at Melville = 8.5 years.
Most (75%) competing companies offer the following: 2 weeks
(10 days) after 1 year, 3 weeks after 10 years, and 4 weeks after
20 years.
LUNCH
Thirty minutes allowed for lunch/PAID.
Competing companies vary widely: From 30 minutes unpaid up
to 1 hour paid.
BREAKS
Two 10-minute breaks per 8 hour shift.
Also 10 minutes for personal clean-up at end of shift (Paid).
Competitors range from ten minute breaks to 20 minute breaks.
HOLIDAYS
Eight paid holidays (to be named in contract)
Competitors average 9 paid holidays.
BEREAVEMENT LEAVE
NONE
Competitors usually offer 3 days for immediate family.
LAYOFF
Need to determine the basis (e.g., seniority) for any layoffs and
other policy issues
Research this one.
SICK LEAVE
Receive one half day per month or 6 paid sick days per year.
15. No carry over.
Among competing firms: 5 have 6 days per year, 8 have 12 per
year, and 7 have no paid sick leave.
FMLA
Negotiate a FMLA policy
Federal law mandates 12 weeks unpaid.
SUPPLE-
MENTAL
UNEMP.
BENEFITS
NONE
SUB would cost the company an estimated $1000 per employee
per year.
HEALTH CARE
Company pays $405/month premium per employee for major
medical coverage with 80/20 co-pay with a maximum deductible
of $3000. Family coverage available at employee's expense
($275/month premium).
27% of the competing companies pay for family coverage.
Most use the 80/20 co-pay system for major medical with
maximum deductibles ranging from $500 to $6000.
EAP
NONE
Research this one.
DENTAL
CARE
NONE
If company pays, would cost $120 per employee with $100
deductible. Family coverage costs an additional $180 per
employee per year.,
PROFIT SHARE
NONE
16. (Provide all important details for any proposed plan!)
If current profit levels are maintained, typical payments to each
employee would be about $300 per year with a 25/75 split.
Two competitors offer gainsharing incentives.
GRIEVANCE PROCESS
NONE SPECIFIED IN CONTRACT, Employees register
complaints with an elected union steward who negotiates with
management personnel.
Most other union contracts specify procedures.
PENSION
NONE
(Provide all important details for any proposed plan!)
Melville is the only company in the area that doesn't have some
form of pension plan.
OTHER ISSUES:
TBA
YOUR OPPORTUNITY FOR ADDITIONAL RESEARCH
CONTRACT LENGTH
Three years
Among competing unionized companies: Three have 3 year
contracts, two have 2 year contracts, an one has a 1year
Each part will be graded using the following scale:
A= Demonstrates complete understanding of all concepts.
Shows insights and initiative by providing information beyond
the text and this handout. Accurately cites all outside research.
B= Demonstrates complete understanding of all but a few
concepts. Shows evidence of work beyond the minimum
requirements.
C= Demonstrates basic understanding of most key concepts.
Provides answers to the parts based mainly on the text and this
17. handout. Limits contract coverage to issues currently stated.
D= Demonstrates confusion on some key concepts, and/or
evidence of minimal effort. Employees would probably raise
many questions with the contract.
F= Unacceptable work due to confusing explanations of key
concepts, major omissions, or other errors which demonstrates a
lack of understanding of the concepts or lack of effort.