AVL Trees
Adelson-Velskii and Landis
Binary Search Tree - Best Time
All BST operations are O(d), where d is tree depth
minimum d is for a binary tree with N nodes
What is the best case tree?
What is the worst case tree?
So, best case running time of BST operations is O(log N)
Binary Search Tree - Worst Time
Worst case running time is O(N)
What happens when you Insert elements in ascending order?
Insert: 2, 4, 6, 8, 10, 12 into an empty BST
Problem: Lack of balance:
compare depths of left and right subtree
Unbalanced degenerate tree
Balanced and unbalanced BST
Approaches to balancing trees
Don't balance
May end up with some nodes very deep
Strict balance
The tree must always be balanced perfectly
Pretty good balance
Only allow a little out of balance
Adjust on access
Self-adjusting
Balancing Binary Search Trees
Many algorithms exist for keeping binary search trees balanced
Adelson-Velskii and Landis (AVL) trees (height-balanced trees)
Splay trees and other self-adjusting trees
B-trees and other multiway search trees
Perfect Balance
Want a complete tree after every operation
tree is full except possibly in the lower right
This is expensive
For example, insert 2 in the tree on the left and then rebuild as a complete tree
AVL - Good but not Perfect Balance
AVL trees are height-balanced binary search trees
Balance factor of a node
height(left subtree) - height(right subtree)
An AVL tree has balance factor calculated at every node
For every node, heights of left and right subtree can differ by no more than 1
Store current heights in each node
Height of an AVL Tree
N(h) = minimum number of nodes in an AVL tree of height h.
Basis
N(0) = 1, N(1) = 2
Induction
N(h) = N(h-1) + N(h-2) + 1
Solution (recall Fibonacci analysis)
N(h) > h ( 1.62)
Height of an AVL Tree
N(h) > h ( 1.62)
Suppose we have n nodes in an AVL tree of height h.
n > N(h) (because N(h) was the minimum)
n > h hence log n > h (relatively well balanced tree!!)
h < 1.44 log2n (i.e., Find takes O(logn))
Node Heights
Node Heights after Insert 7
Insert and Rotation in AVL Trees
Insert operation may cause balance factor to become 2 or 2 for some node
only nodes on the path from insertion point to root node have possibly changed in height
So after the Insert, go back up to the root node by node, updating heights
If a new balance factor is 2 or 2, adjust tree by rotation around the node
Single Rotation in an AVL Tree
Implementation
Single Rotation
Double Rotation
Implement Double Rotation in two lines.
Insertion in AVL Trees
Insert at the leaf (as for all BST)
only nodes on the path from insertion point to root node have possibly changed in height
So after the Insert, go back up to the root node by node, updating heights
If a new balance factor is 2 or 2, adjust tree by rotation around the node
Insert in BST
Insert in AVL trees
Example of Insertions in an A
This document provides an overview of cloud computing. It defines cloud computing as network-based computing that takes place over the Internet, providing hardware, software, and networking services to clients. Key characteristics of cloud computing include on-demand services that are available anywhere and anytime, elastic scaling, and pay-as-you-go pricing. The document discusses different cloud service models including Software as a Service (SaaS), Platform as a Service (PaaS), and Infrastructure as a Service (IaaS). It also covers advantages such as lower costs, improved performance and collaboration, and unlimited storage, as well as disadvantages like reliance on internet connectivity and potential security and data loss issues.
This document provides an introduction and overview of cloud computing and related topics. It discusses web-scale problems involving large amounts of data, the use of large data centers to process this data in parallel, and different models for cloud computing including utility computing, platform as a service, and software as a service. It also covers challenges in parallel and distributed processing like assigning work units across workers and managing shared resources and synchronization.
Thus cloud computing provides super-computing power by connecting hundreds or thousands of computers together in a cloud. This cloud of computers extends beyond a single company or enterprise, making the applications and data accessible to a broad group of users across different companies and platforms. Users can access documents, software programs, and other data from any Internet-connected computer rather than just their own personal computer.
1. 4/13/2010
QU N TR M NG
WINDOWS SERVER 2003
Bi 3
QU N L TI KHO N
NG働 I DNG V NHM
nh ngh挑a ti kho n ng動 i
d湛ng v ti kho n nh坦m
Ti kho n ng動 i d湛ng
Tr棚n m ng Windows c坦 hai lo i ti kho n ng動 i
d湛ng l:
Ng動 i d湛ng c c b : L ti kho n ng動 i d湛ng 動 c
t o ra tr棚n m叩y t鱈nh c c b .
Ti kho n ng動 i d湛ng mi n: L ti kho n 動 c t o ra
tr棚n m叩y i u khi n mi n.
1
2. 4/13/2010
Ti kho n ng動 i d湛ng (t.t)
Y棚u c u ti kho n ng動 i d湛ng
Username: di 1-20 k箪 t (tr棚n Windows Server
2003, username c坦 th di 104 k箪 t , tuy nhi棚n khi
ng nh p t c叩c m叩y ci h i u hnh Windows
NT 4.0 v tr動 c th狸 m c nh ch hi u 20 k箪 t )
Username l m t chu i duy nh t
Username kh担ng ch a c叩c k箪 t sau: / [ ] : ; | = ,
+*?<>
Username c坦 th ch a c叩c k箪 t c bi t: d u
ch m c但u, kho ng tr ng, d u g ch ngang, d u g ch
d動 i.
nh ngh挑a ti kho n ng動 i
d湛ng v ti kho n nh坦m (t.t)
Ti kho n nh坦m
L i t動 ng i di n cho m t nh坦m user
Nh坦m b o m t (Security group)
Nh坦m b o m t 動 c d湛ng c p ph叩t c叩c quy n
h th ng (rights) v quy n truy c p (permission).
M i nh坦m b o m t c坦 m t SID ri棚ng.
C坦 4 lo i nh坦m b o m t: local (nh坦m c c b ),
domain local (nh坦m c c b mi n), global (nh坦m
ton c c hay nh坦m ton m ng) v universal (nh坦m
ph qu叩t).
Nh坦m ph但n ph i (distribution group).
Nh坦m ph但n ph i l nh坦m phi b o m t, kh担ng c坦
SID v kh担ng xu t hi n trong ACL (Access Control
List).
2
3. 4/13/2010
nh ngh挑a ti kho n ng動 i
d湛ng v ti kho n nh坦m (t.t)
Nh坦m b o m t (Security group)
Local group l lo i nh坦m c坦 tr棚n c叩c m叩y stand-alone
Server, member server, Win2K Pro hay WinXP.
Domain local group l lo i nh坦m c c b c bi t v狸 ch炭ng
l local group nh動ng n m tr棚n mi m
Global group l lo i nh坦m n m trong Active Directory v
動 c t o tr棚n c叩c Domain Controller.
Universal group l lo i nh坦m c坦 ch c nng gi ng nh動
global group nh動ng n坦 d湛ng c p quy n cho c叩c i
t動 ng tr棚n kh p c叩c mi n trong m t r ng v gi a c叩c mi n
c坦 thi t l p quan h tin c y v i nhau.
Ti kho n nh坦m (t.t)
Qui t t gia nh p nh坦m
T t c c叩c nh坦m Domain
local, Global, Universal u
c坦 th t vo trong nh坦m
Machine Local.
T t c c叩c nh坦m Domain
local, Global, Universal u
c坦 th d t vo trong ch鱈nh
lo i nh坦m c a m狸nh.
Nh坦m Global v Universal
c坦 th t vo trong nh坦m
Domain local.
Nh坦m Global c坦 th t vo
trong nh坦m Universal.
3
4. 4/13/2010
C叩c ti kho n t o s n
C叩c ti kho n ng動 i d湛ng t o s n
Administrator
Guest
ILS_Anonymous_User
IUSR_computer-name
IWAM_computer-name
Krbtgt
TSInternetUser
C叩c ti kho n t o s n (t.t)
Ti kho n nh坦m Domain Local t o s n
Administrators Nh坦m Domain Admins v Enterprise Admins l
thnh vi棚n m c nh c a nh坦m
Administrators.
Account Operators
Domain Controllers
Backup Operators
Guests
Print Operator
Server Operators
Users M c nh m i ng動 i d湛ng 動 c t o u thu c nh坦m ny
Replicator
Incoming Forest Trust Builders
Network Configuration Operators
Pre-Windows 2000 Compatible Access
Remote Desktop User
Performace Log Users
Performace Monitor Users
4
5. 4/13/2010
C叩c ti kho n t o s n (t.t)
Ti kho n nh坦m Global t o s n
Domain Admins Thnh vi棚n c a nh坦m ny c坦 th ton
quy n qu n tr c叩c m叩y t鱈nh trong mi n
Domain Users M c nh nh坦m ny l thnh vi棚n c a
nh坦m c c b Users tr棚n c叩c m叩y server thnh vi棚n v
m叩y tr m
Group Policy Creator Owners
Enterprise Admins
Schema Admins
C叩c ti kho n t o s n (t.t)
C叩c nh坦m t o s n c bi t
Interactive
Network
Everyone i di n cho t t c m i ng動 i d湛ng
System
Creator owner i di n cho nh ng ng動 i t o ra
Authenticated users i di n cho nh ng ng動 i d湛ng
達 動 c h th ng x叩c th c
Anonymous logon
Service
Dialup
5
6. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
C担ng c qu n l箪 ti kho n ng動 i d湛ng c c
b
D湛ng c担ng c Local Users and Groups
C坦 2 ph動董ng th c truy c p n c担ng c Local
Users and Groups
D湛ng nh動 m t MMC (Microsoft Management
Console) snap-in.
D湛ng th担ng qua c担ng c Computer Management
Qu n l箪 ti kho n ng動 i d湛ng v nh坦m
c cb
C叩c b動 c d湛ng th担ng
qua c担ng c Computer
Management
Right click vo My Computer
ch n Manage
Tr棚n mn h狸nh Computer
Management ch n Local
Users and Group ch n Users
Right click vo kho ng tr ng
tr棚n mn h狸nh b棚n ph i v
ch n New User
6
7. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
User must change password at
next logon: ng nh p l n u
vo m叩y c c b ng動 i d湛ng ph i
i password.
User cannot change password:
ng動 i d湛ng kh担ng 動 c thay i
password.
Password never expires:
Password kh担ng bao gi b lo i
b .
Account is disabled: ti kho n
s b c m truy c p t m th i
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
X坦a, s a t棚n, thay i m t kh u ng動 i d湛ng ch c n ch n
chu t ph i t動董ng ng v i c叩c m c: Delete, Rename, Set
Password
7
8. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
動a user vo trong
group
T menu ng動 i d湛ng, khi
ch n tab Member of ch n
group 動a vo
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
C叩c b動 c ch竪n Local Local Users and
Groups snap-in vo trong
Vo Start > Run, g探 l nh MMC -> OK-> Xu t hi n mn h狸nh
Console1
8
9. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
C叩c b動 c ch竪n
Local Local
Users and
Groups snap-in
vo trong
Vo File > Add/Remove
Snap-in >Add
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m c c b
C叩c b動 c ch竪n
Local Local
Users and
Groups snap-in
vo trong
Trong mn h狸nh Add
Standalone Snap-in ->
ch n Local users and
Groups -> Add
9
10. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng v nh坦m
tr棚n Active Directory
C担ng c qu n l箪 ti kho n ng動 i d湛ng
tr棚n Active Directory
C担ng c Active
Directory User
and Computer
Truy xu t c担ng
c Active
Directory User
and Computer
th担ng qua MMC
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Qu n l箪 ti kho n
user tr棚n Active
Directory
T o ti kho n User:
t i c a s Active
Directory Users and
Computers nh p
chu t ph i ch n m c
User->New->User
Nh p th担ng tin user
sau 坦 Next
10
11. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Nh p m t kh u
cho User v c叩c
l a ch n:
Password ph c t p
h董n sao cho tho 3
trong 4 i u ki n
sau:k箪 t ch
th動 ng abc...,k箪 t
ch hoa ABC...,k箪
t s 123...,k箪 t
c bi c
nh動:!@#$%^ ...
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
C u h狸nh thu c
t鱈nh ti kho n
ng動 i d湛ng
c u h狸nh c叩c
thu c t鱈nh c a ti
kho n ng動 i d湛ng
tr棚n mn h狸nh Active
Directory ta nh p
ph i chu t vo ti
kho n ch n
Properties
11
12. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Tab General, Tab Address,
tab Telephones, tab
organization: C叩c th担ng tin
m r ng c a ng動 i d湛ng
Tab Account: Khai b叩o l i
username, quy nh gi
logon
Tab Profile: 動 ng d n
n profile c a ti kho n
ng動 i d湛ng
Profile l m t th動 m c
ch a th担ng tin v m担i
tr動 ng lm vi c Win2k3
cho t ng ng動 i d湛ng
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Tab Member Of: c u h狸nh
ti kho n ng動 i d湛ng l
thnh vi棚n c a nh坦m no.
M t ti kho n c坦 th l
thnh vi棚n nhi u nh坦m v
h動 ng t t c c叩c quy n
c a t t c c叩c nh坦m 坦.
Tab Dial-in: cho ph辿p c u
h狸nh quy n truy c p t xa
c a ng動 i d湛ng cho k t n i
dial-in ho c VNP
12
13. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
T o m i ti
kho n nh坦m:
S d ng c担ng c
Active Dirctory
Users and
Computers
Nh p chu t ph i
vo m c Users ch n
New v ch n Group
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Th棚m
thnh vi棚n
cho nh坦m:
Tr棚n mn h狸nh
Active
Directory
Users and
Computers
nh p ph i vo
t棚n nh坦m v
ch n
Properties.
13
14. 4/13/2010
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Th棚m
thnh vi棚n
cho nh坦m:
Nh p th
Member.
Nh p n炭t Add
Qu n l箪 ti kho n ng動 i d湛ng
v nh坦m tr棚n Active Directory
Th棚m
thnh vi棚n
cho nh坦m:
Ch n c叩c ti
kho n mu n l
thnh vi棚n c a
nh坦m ->OK
14