RED BLACK TREE ALGORITHM FULL REPORT
#1

SUBMITTED BY
CHANDRASHEKHAR RAI
GAURAV KUMAR GOYAL
MOHAMMAD FAISAL
RAJESH SINGH

[attachment=13654]
INTRODUCTION
Red-black trees-

A red-black tree is a binary search tree + 1 bit per node: an attribute color, which
is either red or black.
All leaves are empty (nil) and colored black.
• We use a single sentinel, nil[T ], for all the leaves of red-black tree T .
• color[nil[T ]] is black.
• The root.s parent is also nil[T ].
All other attributes of binary search trees are inherited by red-black trees (key, left,
right, and p). We don.t care about the key in nil[T ].
Red-black properties-
1. Every node is either red or black.
2. The root is black.
3. Every leaf (nil[T ]) is black.
4. If a node is red, then both its children are black. (Hence no two reds in a row
on a simple path from the root to a leaf.)
5. For each node, all paths from the node to descendant leaves contain the samenumber of black nodes.
HARDWARE REQUREMENT-
Processor Pentium III with 733 MHz
Random Access Memory 256 MB
Hard Disk 10GB
Screen Resolution 800 by 600
Color Quality 16 bit
SOFTWARE REQUREMENT-
OS ALL VERSION OF WINDOWS
Front End JAVA
LANGUAGE USED –JAVA
Code:
CODING-

import java.io.*;

import java.util.*;

import java.awt.*;

import java.awt.event.*;

/* <applet code=RedBlackTree.java width=1024 height=600>
</applet>*/

class Node

{

   int level;    // root level = 0, next level = 1, etc. used only by new node

   int indent;   // leftmost node in a level = 0, 1 is next right node, etc. used only by new node

   Node parent;

   Node leftTree;

   Node rightTree;

   int value;

   Color color;



   public Node(int v, Color clr)

   {

      level = 0;

      indent = 0;

      parent = null;

      value = v;

      color = clr;

      leftTree = null;

      rightTree = null;

   }



   int  getValue()        { return value; }

   Node getParent()     { return parent; }

   Node  getRightTree() { return rightTree; }

   Node  getLeftTree()  { return leftTree; }

   int  getLevel()     { return level; }

   int  getIndent()    { return indent; }

   Color getColor()    { return color; }

  

   void setValue(int v)  { value = v; }

   void setParent(Node p)     { parent = p; }

   void setLeftTree(Node lt)   { leftTree = lt; }

   void setRightTree(Node rt)   { rightTree = rt; }

   void setLevel(int lv)  { level = lv; }

   void setIndent(int in) { indent = in; }

   void setColor(Color c) { color = c; }



   boolean isRightChild() {

       return (this == parent.getRightTree());

   }



   boolean isLeftChild() {

       return (this == parent.getLeftTree());

   }

}



class TreePanel extends Panel

{

   RedBlackTree graph;

   Node pick;

   Node deletingNode;

   Color deletingSaveColor;

   boolean deleteNode = false, removingNode = false;



   TreePanel(RedBlackTree graph) {  this.graph = graph;  }



   Image offscreen;

   Dimension offscreensize;

   Graphics offScreen;

   int offset = 28;



   public void paint(Graphics g) {

      update(g);

   }

  

   public void update(Graphics g)

   {

      Dimension d = getSize();

      if ((offscreen == null) || (d.width != offscreensize.width) ||

          (d.height != offscreensize.height))

      {

         offscreen = createImage(d.width, d.height);

         offscreensize = d;

         offScreen = offscreen.getGraphics();

         offScreen.setFont(getFont());

      }
Reply
#2



to get information about the topic "red black tree applet code" full report ppt and related topic refer the page link bellow

http://studentbank.in/report-red-black-t...ull-report

http://studentbank.in/report-red-black-trees-report
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: seminar report for decission tree, red deer management jobs, duane hanson red star, red star stadium, java code for red algorithm, red bull project stratos, ieee seminar for red tatcon,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  SAMBA SERVER ADMINISTRATION full report project report tiger 3 4,719 17-01-2018, 05:40 PM
Last Post: AustinnuAke
  air ticket reservation system full report project report tiger 16 46,803 08-01-2018, 02:33 PM
Last Post: RaymondGom
  An Efficient Algorithm for Mining Frequent Patterns full report project topics 3 4,714 01-10-2016, 10:02 AM
Last Post: Guest
  online examination full report project report tiger 14 42,735 03-09-2016, 11:20 AM
Last Post: jaseela123d
  watermarking algorithm seminar class 3 2,663 27-04-2016, 11:17 AM
Last Post: dhanabhagya
  Employee Cubicle Management System full report computer science technology 4 5,081 07-04-2016, 11:37 AM
Last Post: dhanabhagya
  e-Post Office System full report computer science technology 27 25,750 30-03-2016, 02:56 PM
Last Post: dhanabhagya
  college website project full report project report tiger 28 67,021 29-11-2015, 02:37 PM
Last Post: Guest
  DYNAMIC SEARCH ALGORITHM IN UNSTRUCTURED PEER-TO-PEER NETWORKS--PARALLEL AND DISTRIBU electronics seminars 9 7,327 14-07-2015, 02:25 PM
Last Post: seminar report asees
  steganography full report project report tiger 31 33,550 07-07-2015, 02:57 PM
Last Post: seminar report asees

Forum Jump: