diff --git a/Analysis/Compression_Analysis/PSNR.py b/Analysis/Compression_Analysis/PSNR.py deleted file mode 100644 index 1585c8cfc..000000000 --- a/Analysis/Compression_Analysis/PSNR.py +++ /dev/null @@ -1,38 +0,0 @@ -import numpy as np -import math -import cv2 - -def Representational(r,g,b): - return (0.299*r+0.287*g+0.114*b) - -def calculate(img): - b,g,r = cv2.split(img) - pixelAt = Representational(r,g,b) - return pixelAt - -def main(): - - #Loading images (orignal image and compressed image) - orignal_image = cv2.imread('orignal_image.png',1) - compressed_image = cv2.imread('compressed_image.png',1) - - #Getting image height and width - height,width = orignal_image.shape[:2] - - orignalPixelAt = calculate(orignal_image) - compressedPixelAt = calculate(compressed_image) - - diff = orignalPixelAt - compressedPixelAt - error = np.sum(np.abs(diff) ** 2) - - error = error/(height*width) - - #MSR = error_sum/(height*width) - PSNR = -(10*math.log10(error/(255*255))) - - print("PSNR value is {}".format(PSNR)) - - -if __name__ == '__main__': - main() - diff --git a/Analysis/Compression_Analysis/compressed_image.png b/Analysis/Compression_Analysis/compressed_image.png deleted file mode 100644 index 75c41c21c..000000000 Binary files a/Analysis/Compression_Analysis/compressed_image.png and /dev/null differ diff --git a/Analysis/Compression_Analysis/example_image.jpg b/Analysis/Compression_Analysis/example_image.jpg deleted file mode 100644 index 3a58ba3a8..000000000 Binary files a/Analysis/Compression_Analysis/example_image.jpg and /dev/null differ diff --git a/Analysis/Compression_Analysis/orignal_image.png b/Analysis/Compression_Analysis/orignal_image.png deleted file mode 100644 index 09a76ffa8..000000000 Binary files a/Analysis/Compression_Analysis/orignal_image.png and /dev/null differ diff --git a/ArithmeticAnalysis/Bisection.py b/ArithmeticAnalysis/Bisection.py deleted file mode 100644 index a6af547db..000000000 --- a/ArithmeticAnalysis/Bisection.py +++ /dev/null @@ -1,33 +0,0 @@ -import math - - -def bisection(function, a, b): # finds where the function becomes 0 in [a,b] using bolzano - - start = a - end = b - if function(a) == 0: # one of the a or b is a root for the function - return a - elif function(b) == 0: - return b - elif function(a) * function(b) > 0: # if none of these are root and they are both positive or negative, - # then his algorithm can't find the root - print("couldn't find root in [a,b]") - return - else: - mid = (start + end) / 2 - while abs(start - mid) > 0.0000001: # until we achieve precise equals to 10^-7 - if function(mid) == 0: - return mid - elif function(mid) * function(start) < 0: - end = mid - else: - start = mid - mid = (start + end) / 2 - return mid - - -def f(x): - return math.pow(x, 3) - 2*x - 5 - - -print(bisection(f, 1, 1000)) diff --git a/ArithmeticAnalysis/Intersection.py b/ArithmeticAnalysis/Intersection.py deleted file mode 100644 index 22c50f2ec..000000000 --- a/ArithmeticAnalysis/Intersection.py +++ /dev/null @@ -1,16 +0,0 @@ -import math - -def intersection(function,x0,x1): #function is the f we want to find its root and x0 and x1 are two random starting points - x_n = x0 - x_n1 = x1 - while True: - x_n2 = x_n1-(function(x_n1)/((function(x_n1)-function(x_n))/(x_n1-x_n))) - if abs(x_n2 - x_n1)<0.00001 : - return x_n2 - x_n=x_n1 - x_n1=x_n2 - -def f(x): - return math.pow(x,3)-2*x-5 - -print(intersection(f,3,3.5)) diff --git a/ArithmeticAnalysis/LUdecomposition.py b/ArithmeticAnalysis/LUdecomposition.py deleted file mode 100644 index da05fb65d..000000000 --- a/ArithmeticAnalysis/LUdecomposition.py +++ /dev/null @@ -1,34 +0,0 @@ -import numpy - -def LUDecompose (table): - #table that contains our data - #table has to be a square array so we need to check first - rows,columns=numpy.shape(table) - L=numpy.zeros((rows,columns)) - U=numpy.zeros((rows,columns)) - if rows!=columns: - return - for i in range (columns): - for j in range(i-1): - sum=0 - for k in range (j-1): - sum+=L[i][k]*U[k][j] - L[i][j]=(table[i][j]-sum)/U[j][j] - L[i][i]=1 - for j in range(i-1,columns): - sum1=0 - for k in range(i-1): - sum1+=L[i][k]*U[k][j] - U[i][j]=table[i][j]-sum1 - return L,U - - - - - - - -matrix =numpy.array([[2,-2,1],[0,1,2],[5,3,1]]) -L,U = LUDecompose(matrix) -print(L) -print(U) diff --git a/ArithmeticAnalysis/NewtonMethod.py b/ArithmeticAnalysis/NewtonMethod.py deleted file mode 100644 index c3d5efb47..000000000 --- a/ArithmeticAnalysis/NewtonMethod.py +++ /dev/null @@ -1,15 +0,0 @@ -def newton(function,function1,startingInt): #function is the f(x) and function1 is the f'(x) - x_n=startingInt - while True: - x_n1=x_n-function(x_n)/function1(x_n) - if abs(x_n-x_n1)<0.00001: - return x_n1 - x_n=x_n1 - -def f(x): - return (x**3)-2*x-5 - -def f1(x): - return 3*(x**2)-2 - -print(newton(f,f1,3)) diff --git a/ArithmeticAnalysis/NewtonRaphsonMethod.py b/ArithmeticAnalysis/NewtonRaphsonMethod.py deleted file mode 100644 index 5e7e2f930..000000000 --- a/ArithmeticAnalysis/NewtonRaphsonMethod.py +++ /dev/null @@ -1,36 +0,0 @@ -# Implementing Newton Raphson method in Python -# Author: Haseeb - -from sympy import diff -from decimal import Decimal - -def NewtonRaphson(func, a): - ''' Finds root from the point 'a' onwards by Newton-Raphson method ''' - while True: - c = Decimal(a) - ( Decimal(eval(func)) / Decimal(eval(str(diff(func)))) ) - - a = c - - # This number dictates the accuracy of the answer - if abs(eval(func)) < 10**-15: - return c - - -# Let's Execute -if __name__ == '__main__': - # Find root of trigonometric function - # Find value of pi - print ('sin(x) = 0', NewtonRaphson('sin(x)', 2)) - - # Find root of polynomial - print ('x**2 - 5*x +2 = 0', NewtonRaphson('x**2 - 5*x +2', 0.4)) - - # Find Square Root of 5 - print ('x**2 - 5 = 0', NewtonRaphson('x**2 - 5', 0.1)) - - # Exponential Roots - print ('exp(x) - 1 = 0', NewtonRaphson('exp(x) - 1', 0)) - - - - diff --git a/File_Transfer_Protocol/ftp_client_server.py b/File_Transfer_Protocol/ftp_client_server.py deleted file mode 100644 index f73f85843..000000000 --- a/File_Transfer_Protocol/ftp_client_server.py +++ /dev/null @@ -1,58 +0,0 @@ -# server - -import socket # Import socket module - -port = 60000 # Reserve a port for your service. -s = socket.socket() # Create a socket object -host = socket.gethostname() # Get local machine name -s.bind((host, port)) # Bind to the port -s.listen(5) # Now wait for client connection. - -print('Server listening....') - -while True: - conn, addr = s.accept() # Establish connection with client. - print('Got connection from', addr) - data = conn.recv(1024) - print('Server received', repr(data)) - - filename = 'mytext.txt' - f = open(filename, 'rb') - in_data = f.read(1024) - while (in_data): - conn.send(in_data) - print('Sent ', repr(in_data)) - in_data = f.read(1024) - f.close() - - print('Done sending') - conn.send('Thank you for connecting') - conn.close() - - -# client side server - -import socket # Import socket module - -s = socket.socket() # Create a socket object -host = socket.gethostname() # Get local machine name -port = 60000 # Reserve a port for your service. - -s.connect((host, port)) -s.send("Hello server!") - -with open('received_file', 'wb') as f: - print('file opened') - while True: - print('receiving data...') - data = s.recv(1024) - print('data=%s', (data)) - if not data: - break - # write data to a file - f.write(data) - -f.close() -print('Successfully get the file') -s.close() -print('connection closed') diff --git a/File_Transfer_Protocol/ftp_send_receive.py b/File_Transfer_Protocol/ftp_send_receive.py deleted file mode 100644 index d4919158a..000000000 --- a/File_Transfer_Protocol/ftp_send_receive.py +++ /dev/null @@ -1,36 +0,0 @@ -""" - File transfer protocol used to send and receive files using FTP server. - Use credentials to provide access to the FTP client - - Note: Do not use root username & password for security reasons - Create a seperate user and provide access to a home directory of the user - Use login id and password of the user created - cwd here stands for current working directory -""" - -from ftplib import FTP -ftp = FTP('xxx.xxx.x.x') # Enter the ip address or the domain name here -ftp.login(user='username', passwd='password') -ftp.cwd('/Enter the directory here/') - -""" - The file which will be received via the FTP server - Enter the location of the file where the file is received -""" - -def ReceiveFile(): - FileName = 'example.txt' """ Enter the location of the file """ - LocalFile = open(FileName, 'wb') - ftp.retrbinary('RETR ' + FileName, LocalFile.write, 1024) - ftp.quit() - LocalFile.close() - -""" - The file which will be sent via the FTP server - The file send will be send to the current working directory -""" - -def SendFile(): - FileName = 'example.txt' """ Enter the name of the file """ - ftp.storbinary('STOR ' + FileName, open(FileName, 'rb')) - ftp.quit() diff --git a/Graphs/ArticulationPoints.py b/Graphs/ArticulationPoints.py deleted file mode 100644 index 1173c4ea3..000000000 --- a/Graphs/ArticulationPoints.py +++ /dev/null @@ -1,44 +0,0 @@ -# Finding Articulation Points in Undirected Graph -def computeAP(l): - n = len(l) - outEdgeCount = 0 - low = [0] * n - visited = [False] * n - isArt = [False] * n - - def dfs(root, at, parent, outEdgeCount): - if parent == root: - outEdgeCount += 1 - visited[at] = True - low[at] = at - - for to in l[at]: - if to == parent: - pass - elif not visited[to]: - outEdgeCount = dfs(root, to, at, outEdgeCount) - low[at] = min(low[at], low[to]) - - # AP found via bridge - if at < low[to]: - isArt[at] = True - # AP found via cycle - if at == low[to]: - isArt[at] = True - else: - low[at] = min(low[at], to) - return outEdgeCount - - for i in range(n): - if not visited[i]: - outEdgeCount = 0 - outEdgeCount = dfs(i, i, -1, outEdgeCount) - isArt[i] = (outEdgeCount > 1) - - for x in range(len(isArt)): - if isArt[x] == True: - print(x) - -# Adjacency list of graph -l = {0:[1,2], 1:[0,2], 2:[0,1,3,5], 3:[2,4], 4:[3], 5:[2,6,8], 6:[5,7], 7:[6,8], 8:[5,7]} -computeAP(l) diff --git a/Graphs/CheckBipartiteGraph_BFS.py b/Graphs/CheckBipartiteGraph_BFS.py deleted file mode 100644 index 1b9c32c6c..000000000 --- a/Graphs/CheckBipartiteGraph_BFS.py +++ /dev/null @@ -1,43 +0,0 @@ -# Check whether Graph is Bipartite or Not using BFS - -# A Bipartite Graph is a graph whose vertices can be divided into two independent sets, -# U and V such that every edge (u, v) either connects a vertex from U to V or a vertex -# from V to U. In other words, for every edge (u, v), either u belongs to U and v to V, -# or u belongs to V and v to U. We can also say that there is no edge that connects -# vertices of same set. -def checkBipartite(l): - queue = [] - visited = [False] * len(l) - color = [-1] * len(l) - - def bfs(): - while(queue): - u = queue.pop(0) - visited[u] = True - - for neighbour in l[u]: - - if neighbour == u: - return False - - if color[neighbour] == -1: - color[neighbour] = 1 - color[u] - queue.append(neighbour) - - elif color[neighbour] == color[u]: - return False - - return True - - for i in range(len(l)): - if not visited[i]: - queue.append(i) - color[i] = 0 - if bfs() == False: - return False - - return True - -# Adjacency List of graph -l = {0:[1,3], 1:[0,2], 2:[1,3], 3:[0,2]} -print(checkBipartite(l)) diff --git a/Graphs/FindingBridges.py b/Graphs/FindingBridges.py deleted file mode 100644 index 56533dd48..000000000 --- a/Graphs/FindingBridges.py +++ /dev/null @@ -1,31 +0,0 @@ -# Finding Bridges in Undirected Graph -def computeBridges(l): - id = 0 - n = len(l) # No of vertices in graph - low = [0] * n - visited = [False] * n - - def dfs(at, parent, bridges, id): - visited[at] = True - low[at] = id - id += 1 - for to in l[at]: - if to == parent: - pass - elif not visited[to]: - dfs(to, at, bridges, id) - low[at] = min(low[at], low[to]) - if at < low[to]: - bridges.append([at, to]) - else: - # This edge is a back edge and cannot be a bridge - low[at] = min(low[at], to) - - bridges = [] - for i in range(n): - if (not visited[i]): - dfs(i, -1, bridges, id) - print(bridges) - -l = {0:[1,2], 1:[0,2], 2:[0,1,3,5], 3:[2,4], 4:[3], 5:[2,6,8], 6:[5,7], 7:[6,8], 8:[5,7]} -computeBridges(l) diff --git a/Graphs/KahnsAlgorithm_long.py b/Graphs/KahnsAlgorithm_long.py deleted file mode 100644 index 453b5706f..000000000 --- a/Graphs/KahnsAlgorithm_long.py +++ /dev/null @@ -1,30 +0,0 @@ -# Finding longest distance in Directed Acyclic Graph using KahnsAlgorithm -def longestDistance(l): - indegree = [0] * len(l) - queue = [] - longDist = [1] * len(l) - - for key, values in l.items(): - for i in values: - indegree[i] += 1 - - for i in range(len(indegree)): - if indegree[i] == 0: - queue.append(i) - - while(queue): - vertex = queue.pop(0) - for x in l[vertex]: - indegree[x] -= 1 - - if longDist[vertex] + 1 > longDist[x]: - longDist[x] = longDist[vertex] + 1 - - if indegree[x] == 0: - queue.append(x) - - print(max(longDist)) - -# Adjacency list of Graph -l = {0:[2,3,4], 1:[2,7], 2:[5], 3:[5,7], 4:[7], 5:[6], 6:[7], 7:[]} -longestDistance(l) diff --git a/Graphs/KahnsAlgorithm_topo.py b/Graphs/KahnsAlgorithm_topo.py deleted file mode 100644 index 8c182c4e9..000000000 --- a/Graphs/KahnsAlgorithm_topo.py +++ /dev/null @@ -1,32 +0,0 @@ -# Kahn's Algorithm is used to find Topological ordering of Directed Acyclic Graph using BFS -def topologicalSort(l): - indegree = [0] * len(l) - queue = [] - topo = [] - cnt = 0 - - for key, values in l.items(): - for i in values: - indegree[i] += 1 - - for i in range(len(indegree)): - if indegree[i] == 0: - queue.append(i) - - while(queue): - vertex = queue.pop(0) - cnt += 1 - topo.append(vertex) - for x in l[vertex]: - indegree[x] -= 1 - if indegree[x] == 0: - queue.append(x) - - if cnt != len(l): - print("Cycle exists") - else: - print(topo) - -# Adjacency List of Graph -l = {0:[1,2], 1:[3], 2:[3], 3:[4,5], 4:[], 5:[]} -topologicalSort(l) diff --git a/Graphs/MinimumSpanningTree_Prims.py b/Graphs/MinimumSpanningTree_Prims.py deleted file mode 100644 index 569e73e0a..000000000 --- a/Graphs/MinimumSpanningTree_Prims.py +++ /dev/null @@ -1,111 +0,0 @@ -import sys -from collections import defaultdict - -def PrimsAlgorithm(l): - - nodePosition = [] - def getPosition(vertex): - return nodePosition[vertex] - - def setPosition(vertex, pos): - nodePosition[vertex] = pos - - def topToBottom(heap, start, size, positions): - if start > size // 2 - 1: - return - else: - if 2 * start + 2 >= size: - m = 2 * start + 1 - else: - if heap[2 * start + 1] < heap[2 * start + 2]: - m = 2 * start + 1 - else: - m = 2 * start + 2 - if heap[m] < heap[start]: - temp, temp1 = heap[m], positions[m] - heap[m], positions[m] = heap[start], positions[start] - heap[start], positions[start] = temp, temp1 - - temp = getPosition(positions[m]) - setPosition(positions[m], getPosition(positions[start])) - setPosition(positions[start], temp) - - topToBottom(heap, m, size, positions) - - # Update function if value of any node in min-heap decreases - def bottomToTop(val, index, heap, position): - temp = position[index] - - while(index != 0): - if index % 2 == 0: - parent = int( (index-2) / 2 ) - else: - parent = int( (index-1) / 2 ) - - if val < heap[parent]: - heap[index] = heap[parent] - position[index] = position[parent] - setPosition(position[parent], index) - else: - heap[index] = val - position[index] = temp - setPosition(temp, index) - break - index = parent - else: - heap[0] = val - position[0] = temp - setPosition(temp, 0) - - def heapify(heap, positions): - start = len(heap) // 2 - 1 - for i in range(start, -1, -1): - topToBottom(heap, i, len(heap), positions) - - def deleteMinimum(heap, positions): - temp = positions[0] - heap[0] = sys.maxsize - topToBottom(heap, 0, len(heap), positions) - return temp - - visited = [0 for i in range(len(l))] - Nbr_TV = [-1 for i in range(len(l))] # Neighboring Tree Vertex of selected vertex - # Minimum Distance of explored vertex with neighboring vertex of partial tree formed in graph - Distance_TV = [] # Heap of Distance of vertices from their neighboring vertex - Positions = [] - - for x in range(len(l)): - p = sys.maxsize - Distance_TV.append(p) - Positions.append(x) - nodePosition.append(x) - - TreeEdges = [] - visited[0] = 1 - Distance_TV[0] = sys.maxsize - for x in l[0]: - Nbr_TV[ x[0] ] = 0 - Distance_TV[ x[0] ] = x[1] - heapify(Distance_TV, Positions) - - for i in range(1, len(l)): - vertex = deleteMinimum(Distance_TV, Positions) - if visited[vertex] == 0: - TreeEdges.append((Nbr_TV[vertex], vertex)) - visited[vertex] = 1 - for v in l[vertex]: - if visited[v[0]] == 0 and v[1] < Distance_TV[ getPosition(v[0]) ]: - Distance_TV[ getPosition(v[0]) ] = v[1] - bottomToTop(v[1], getPosition(v[0]), Distance_TV, Positions) - Nbr_TV[ v[0] ] = vertex - return TreeEdges - -# < --------- Prims Algorithm --------- > -n = int(raw_input("Enter number of vertices: ")) -e = int(raw_input("Enter number of edges: ")) -adjlist = defaultdict(list) -for x in range(e): - l = [int(x) for x in input().split()] - adjlist[l[0]].append([ l[1], l[2] ]) - adjlist[l[1]].append([ l[0], l[2] ]) -print(PrimsAlgorithm(adjlist)) diff --git a/Graphs/Multi_Hueristic_Astar.py b/Graphs/Multi_Hueristic_Astar.py deleted file mode 100644 index 1acd098f3..000000000 --- a/Graphs/Multi_Hueristic_Astar.py +++ /dev/null @@ -1,266 +0,0 @@ -from __future__ import print_function -import heapq -import numpy as np - -try: - xrange # Python 2 -except NameError: - xrange = range # Python 3 - - -class PriorityQueue: - def __init__(self): - self.elements = [] - self.set = set() - - def minkey(self): - if not self.empty(): - return self.elements[0][0] - else: - return float('inf') - - def empty(self): - return len(self.elements) == 0 - - def put(self, item, priority): - if item not in self.set: - heapq.heappush(self.elements, (priority, item)) - self.set.add(item) - else: - # update - # print("update", item) - temp = [] - (pri, x) = heapq.heappop(self.elements) - while x != item: - temp.append((pri, x)) - (pri, x) = heapq.heappop(self.elements) - temp.append((priority, item)) - for (pro, xxx) in temp: - heapq.heappush(self.elements, (pro, xxx)) - - def remove_element(self, item): - if item in self.set: - self.set.remove(item) - temp = [] - (pro, x) = heapq.heappop(self.elements) - while x != item: - temp.append((pro, x)) - (pro, x) = heapq.heappop(self.elements) - for (prito, yyy) in temp: - heapq.heappush(self.elements, (prito, yyy)) - - def top_show(self): - return self.elements[0][1] - - def get(self): - (priority, item) = heapq.heappop(self.elements) - self.set.remove(item) - return (priority, item) - -def consistent_hueristic(P, goal): - # euclidean distance - a = np.array(P) - b = np.array(goal) - return np.linalg.norm(a - b) - -def hueristic_2(P, goal): - # integer division by time variable - return consistent_hueristic(P, goal) // t - -def hueristic_1(P, goal): - # manhattan distance - return abs(P[0] - goal[0]) + abs(P[1] - goal[1]) - -def key(start, i, goal, g_function): - ans = g_function[start] + W1 * hueristics[i](start, goal) - return ans - -def do_something(back_pointer, goal, start): - grid = np.chararray((n, n)) - for i in range(n): - for j in range(n): - grid[i][j] = '*' - - for i in range(n): - for j in range(n): - if (j, (n-1)-i) in blocks: - grid[i][j] = "#" - - grid[0][(n-1)] = "-" - x = back_pointer[goal] - while x != start: - (x_c, y_c) = x - # print(x) - grid[(n-1)-y_c][x_c] = "-" - x = back_pointer[x] - grid[(n-1)][0] = "-" - - - for i in xrange(n): - for j in range(n): - if (i, j) == (0, n-1): - print(grid[i][j], end=' ') - print("<-- End position", end=' ') - else: - print(grid[i][j], end=' ') - print() - print("^") - print("Start position") - print() - print("# is an obstacle") - print("- is the path taken by algorithm") - print("PATH TAKEN BY THE ALGORITHM IS:-") - x = back_pointer[goal] - while x != start: - print(x, end=' ') - x = back_pointer[x] - print(x) - quit() - -def valid(p): - if p[0] < 0 or p[0] > n-1: - return False - if p[1] < 0 or p[1] > n-1: - return False - return True - -def expand_state(s, j, visited, g_function, close_list_anchor, close_list_inad, open_list, back_pointer): - for itera in range(n_hueristic): - open_list[itera].remove_element(s) - # print("s", s) - # print("j", j) - (x, y) = s - left = (x-1, y) - right = (x+1, y) - up = (x, y+1) - down = (x, y-1) - - for neighbours in [left, right, up, down]: - if neighbours not in blocks: - if valid(neighbours) and neighbours not in visited: - # print("neighbour", neighbours) - visited.add(neighbours) - back_pointer[neighbours] = -1 - g_function[neighbours] = float('inf') - - if valid(neighbours) and g_function[neighbours] > g_function[s] + 1: - g_function[neighbours] = g_function[s] + 1 - back_pointer[neighbours] = s - if neighbours not in close_list_anchor: - open_list[0].put(neighbours, key(neighbours, 0, goal, g_function)) - if neighbours not in close_list_inad: - for var in range(1,n_hueristic): - if key(neighbours, var, goal, g_function) <= W2 * key(neighbours, 0, goal, g_function): - # print("why not plssssssssss") - open_list[j].put(neighbours, key(neighbours, var, goal, g_function)) - - - # print - -def make_common_ground(): - some_list = [] - # block 1 - for x in range(1, 5): - for y in range(1, 6): - some_list.append((x, y)) - - # line - for x in range(15, 20): - some_list.append((x, 17)) - - # block 2 big - for x in range(10, 19): - for y in range(1, 15): - some_list.append((x, y)) - - # L block - for x in range(1, 4): - for y in range(12, 19): - some_list.append((x, y)) - for x in range(3, 13): - for y in range(16, 19): - some_list.append((x, y)) - return some_list - -hueristics = {0: consistent_hueristic, 1: hueristic_1, 2: hueristic_2} - -blocks_blk = [(0, 1),(1, 1),(2, 1),(3, 1),(4, 1),(5, 1),(6, 1),(7, 1),(8, 1),(9, 1),(10, 1),(11, 1),(12, 1),(13, 1),(14, 1),(15, 1),(16, 1),(17, 1),(18, 1), (19, 1)] -blocks_no = [] -blocks_all = make_common_ground() - - - - -blocks = blocks_blk -# hyper parameters -W1 = 1 -W2 = 1 -n = 20 -n_hueristic = 3 # one consistent and two other inconsistent - -# start and end destination -start = (0, 0) -goal = (n-1, n-1) - -t = 1 -def multi_a_star(start, goal, n_hueristic): - g_function = {start: 0, goal: float('inf')} - back_pointer = {start:-1, goal:-1} - open_list = [] - visited = set() - - for i in range(n_hueristic): - open_list.append(PriorityQueue()) - open_list[i].put(start, key(start, i, goal, g_function)) - - close_list_anchor = [] - close_list_inad = [] - while open_list[0].minkey() < float('inf'): - for i in range(1, n_hueristic): - # print("i", i) - # print(open_list[0].minkey(), open_list[i].minkey()) - if open_list[i].minkey() <= W2 * open_list[0].minkey(): - global t - t += 1 - # print("less prio") - if g_function[goal] <= open_list[i].minkey(): - if g_function[goal] < float('inf'): - do_something(back_pointer, goal, start) - else: - _, get_s = open_list[i].top_show() - visited.add(get_s) - expand_state(get_s, i, visited, g_function, close_list_anchor, close_list_inad, open_list, back_pointer) - close_list_inad.append(get_s) - else: - # print("more prio") - if g_function[goal] <= open_list[0].minkey(): - if g_function[goal] < float('inf'): - do_something(back_pointer, goal, start) - else: - # print("hoolla") - get_s = open_list[0].top_show() - visited.add(get_s) - expand_state(get_s, 0, visited, g_function, close_list_anchor, close_list_inad, open_list, back_pointer) - close_list_anchor.append(get_s) - print("No path found to goal") - print() - for i in range(n-1,-1, -1): - for j in range(n): - if (j, i) in blocks: - print('#', end=' ') - elif (j, i) in back_pointer: - if (j, i) == (n-1, n-1): - print('*', end=' ') - else: - print('-', end=' ') - else: - print('*', end=' ') - if (j, i) == (n-1, n-1): - print('<-- End position', end=' ') - print() - print("^") - print("Start position") - print() - print("# is an obstacle") - print("- is the path taken by algorithm") -multi_a_star(start, goal, n_hueristic) diff --git a/Graphs/a_star.py b/Graphs/a_star.py deleted file mode 100644 index 584222e6f..000000000 --- a/Graphs/a_star.py +++ /dev/null @@ -1,102 +0,0 @@ -from __future__ import print_function - -grid = [[0, 1, 0, 0, 0, 0], - [0, 1, 0, 0, 0, 0],#0 are free path whereas 1's are obstacles - [0, 1, 0, 0, 0, 0], - [0, 1, 0, 0, 1, 0], - [0, 0, 0, 0, 1, 0]] - -''' -heuristic = [[9, 8, 7, 6, 5, 4], - [8, 7, 6, 5, 4, 3], - [7, 6, 5, 4, 3, 2], - [6, 5, 4, 3, 2, 1], - [5, 4, 3, 2, 1, 0]]''' - -init = [0, 0] -goal = [len(grid)-1, len(grid[0])-1] #all coordinates are given in format [y,x] -cost = 1 - -#the cost map which pushes the path closer to the goal -heuristic = [[0 for row in range(len(grid[0]))] for col in range(len(grid))] -for i in range(len(grid)): - for j in range(len(grid[0])): - heuristic[i][j] = abs(i - goal[0]) + abs(j - goal[1]) - if grid[i][j] == 1: - heuristic[i][j] = 99 #added extra penalty in the heuristic map - - -#the actions we can take -delta = [[-1, 0 ], # go up - [ 0, -1], # go left - [ 1, 0 ], # go down - [ 0, 1 ]] # go right - - -#function to search the path -def search(grid,init,goal,cost,heuristic): - - closed = [[0 for col in range(len(grid[0]))] for row in range(len(grid))]# the referrence grid - closed[init[0]][init[1]] = 1 - action = [[0 for col in range(len(grid[0]))] for row in range(len(grid))]#the action grid - - x = init[0] - y = init[1] - g = 0 - f = g + heuristic[init[0]][init[0]] - cell = [[f, g, x, y]] - - found = False # flag that is set when search is complete - resign = False # flag set if we can't find expand - - while not found and not resign: - if len(cell) == 0: - resign = True - return "FAIL" - else: - cell.sort()#to choose the least costliest action so as to move closer to the goal - cell.reverse() - next = cell.pop() - x = next[2] - y = next[3] - g = next[1] - f = next[0] - - - if x == goal[0] and y == goal[1]: - found = True - else: - for i in range(len(delta)):#to try out different valid actions - x2 = x + delta[i][0] - y2 = y + delta[i][1] - if x2 >= 0 and x2 < len(grid) and y2 >=0 and y2 < len(grid[0]): - if closed[x2][y2] == 0 and grid[x2][y2] == 0: - g2 = g + cost - f2 = g2 + heuristic[x2][y2] - cell.append([f2, g2, x2, y2]) - closed[x2][y2] = 1 - action[x2][y2] = i - invpath = [] - x = goal[0] - y = goal[1] - invpath.append([x, y])#we get the reverse path from here - while x != init[0] or y != init[1]: - x2 = x - delta[action[x][y]][0] - y2 = y - delta[action[x][y]][1] - x = x2 - y = y2 - invpath.append([x, y]) - - path = [] - for i in range(len(invpath)): - path.append(invpath[len(invpath) - 1 - i]) - print("ACTION MAP") - for i in range(len(action)): - print(action[i]) - - return path - -a = search(grid,init,goal,cost,heuristic) -for i in range(len(a)): - print(a[i]) - diff --git a/Graphs/basic-graphs.py b/Graphs/basic-graphs.py deleted file mode 100644 index c9a269f1a..000000000 --- a/Graphs/basic-graphs.py +++ /dev/null @@ -1,281 +0,0 @@ -from __future__ import print_function - -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 - -try: - xrange # Python 2 -except NameError: - xrange = range # Python 3 - -# Accept No. of Nodes and edges -n, m = map(int, raw_input().split(" ")) - -# Initialising Dictionary of edges -g = {} -for i in xrange(n): - g[i + 1] = [] - -""" --------------------------------------------------------------------------------- - Accepting edges of Unweighted Directed Graphs --------------------------------------------------------------------------------- -""" -for _ in xrange(m): - x, y = map(int, raw_input().split(" ")) - g[x].append(y) - -""" --------------------------------------------------------------------------------- - Accepting edges of Unweighted Undirected Graphs --------------------------------------------------------------------------------- -""" -for _ in xrange(m): - x, y = map(int, raw_input().split(" ")) - g[x].append(y) - g[y].append(x) - -""" --------------------------------------------------------------------------------- - Accepting edges of Weighted Undirected Graphs --------------------------------------------------------------------------------- -""" -for _ in xrange(m): - x, y, r = map(int, raw_input().split(" ")) - g[x].append([y, r]) - g[y].append([x, r]) - -""" --------------------------------------------------------------------------------- - Depth First Search. - Args : G - Dictionary of edges - s - Starting Node - Vars : vis - Set of visited nodes - S - Traversal Stack --------------------------------------------------------------------------------- -""" - - -def dfs(G, s): - vis, S = set([s]), [s] - print(s) - while S: - flag = 0 - for i in G[S[-1]]: - if i not in vis: - S.append(i) - vis.add(i) - flag = 1 - print(i) - break - if not flag: - S.pop() - - -""" --------------------------------------------------------------------------------- - Breadth First Search. - Args : G - Dictionary of edges - s - Starting Node - Vars : vis - Set of visited nodes - Q - Traveral Stack --------------------------------------------------------------------------------- -""" -from collections import deque - - -def bfs(G, s): - vis, Q = set([s]), deque([s]) - print(s) - while Q: - u = Q.popleft() - for v in G[u]: - if v not in vis: - vis.add(v) - Q.append(v) - print(v) - - -""" --------------------------------------------------------------------------------- - Dijkstra's shortest path Algorithm - Args : G - Dictionary of edges - s - Starting Node - Vars : dist - Dictionary storing shortest distance from s to every other node - known - Set of knows nodes - path - Preceding node in path --------------------------------------------------------------------------------- -""" - - -def dijk(G, s): - dist, known, path = {s: 0}, set(), {s: 0} - while True: - if len(known) == len(G) - 1: - break - mini = 100000 - for i in dist: - if i not in known and dist[i] < mini: - mini = dist[i] - u = i - known.add(u) - for v in G[u]: - if v[0] not in known: - if dist[u] + v[1] < dist.get(v[0], 100000): - dist[v[0]] = dist[u] + v[1] - path[v[0]] = u - for i in dist: - if i != s: - print(dist[i]) - - -""" --------------------------------------------------------------------------------- - Topological Sort --------------------------------------------------------------------------------- -""" -from collections import deque - - -def topo(G, ind=None, Q=[1]): - if ind is None: - ind = [0] * (len(G) + 1) # SInce oth Index is ignored - for u in G: - for v in G[u]: - ind[v] += 1 - Q = deque() - for i in G: - if ind[i] == 0: - Q.append(i) - if len(Q) == 0: - return - v = Q.popleft() - print(v) - for w in G[v]: - ind[w] -= 1 - if ind[w] == 0: - Q.append(w) - topo(G, ind, Q) - - -""" --------------------------------------------------------------------------------- - Reading an Adjacency matrix --------------------------------------------------------------------------------- -""" - - -def adjm(): - n, a = raw_input(), [] - for i in xrange(n): - a.append(map(int, raw_input().split())) - return a, n - - -""" --------------------------------------------------------------------------------- - Floyd Warshall's algorithm - Args : G - Dictionary of edges - s - Starting Node - Vars : dist - Dictionary storing shortest distance from s to every other node - known - Set of knows nodes - path - Preceding node in path - --------------------------------------------------------------------------------- -""" - - -def floy(A_and_n): - (A, n) = A_and_n - dist = list(A) - path = [[0] * n for i in xrange(n)] - for k in xrange(n): - for i in xrange(n): - for j in xrange(n): - if dist[i][j] > dist[i][k] + dist[k][j]: - dist[i][j] = dist[i][k] + dist[k][j] - path[i][k] = k - print(dist) - - -""" --------------------------------------------------------------------------------- - Prim's MST Algorithm - Args : G - Dictionary of edges - s - Starting Node - Vars : dist - Dictionary storing shortest distance from s to nearest node - known - Set of knows nodes - path - Preceding node in path --------------------------------------------------------------------------------- -""" - - -def prim(G, s): - dist, known, path = {s: 0}, set(), {s: 0} - while True: - if len(known) == len(G) - 1: - break - mini = 100000 - for i in dist: - if i not in known and dist[i] < mini: - mini = dist[i] - u = i - known.add(u) - for v in G[u]: - if v[0] not in known: - if v[1] < dist.get(v[0], 100000): - dist[v[0]] = v[1] - path[v[0]] = u - - -""" --------------------------------------------------------------------------------- - Accepting Edge list - Vars : n - Number of nodes - m - Number of edges - Returns : l - Edge list - n - Number of Nodes --------------------------------------------------------------------------------- -""" - - -def edglist(): - n, m = map(int, raw_input().split(" ")) - l = [] - for i in xrange(m): - l.append(map(int, raw_input().split(' '))) - return l, n - - -""" --------------------------------------------------------------------------------- - Kruskal's MST Algorithm - Args : E - Edge list - n - Number of Nodes - Vars : s - Set of all nodes as unique disjoint sets (initially) --------------------------------------------------------------------------------- -""" - - -def krusk(E_and_n): - # Sort edges on the basis of distance - (E, n) = E_and_n - E.sort(reverse=True, key=lambda x: x[2]) - s = [set([i]) for i in range(1, n + 1)] - while True: - if len(s) == 1: - break - print(s) - x = E.pop() - for i in xrange(len(s)): - if x[0] in s[i]: - break - for j in xrange(len(s)): - if x[1] in s[j]: - if i == j: - break - s[j].update(s[i]) - s.pop(i) - break diff --git a/Graphs/minimum_spanning_tree_kruskal.py b/Graphs/minimum_spanning_tree_kruskal.py deleted file mode 100644 index 930aab225..000000000 --- a/Graphs/minimum_spanning_tree_kruskal.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import print_function -num_nodes, num_edges = list(map(int,raw_input().split())) - -edges = [] - -for i in range(num_edges): - node1, node2, cost = list(map(int,raw_input().split())) - edges.append((i,node1,node2,cost)) - -edges = sorted(edges, key=lambda edge: edge[3]) - -parent = [i for i in range(num_nodes)] - -def find_parent(i): - if(i != parent[i]): - parent[i] = find_parent(parent[i]) - return parent[i] - -minimum_spanning_tree_cost = 0 -minimum_spanning_tree = [] - -for edge in edges: - parent_a = find_parent(edge[1]) - parent_b = find_parent(edge[2]) - if(parent_a != parent_b): - minimum_spanning_tree_cost += edge[3] - minimum_spanning_tree.append(edge) - parent[parent_a] = parent_b - -print(minimum_spanning_tree_cost) -for edge in minimum_spanning_tree: - print(edge) diff --git a/Graphs/scc_kosaraju.py b/Graphs/scc_kosaraju.py deleted file mode 100644 index 90d3568fa..000000000 --- a/Graphs/scc_kosaraju.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import print_function -# n - no of nodes, m - no of edges -n, m = list(map(int,raw_input().split())) - -g = [[] for i in range(n)] #graph -r = [[] for i in range(n)] #reversed graph -# input graph data (edges) -for i in range(m): - u, v = list(map(int,raw_input().split())) - g[u].append(v) - r[v].append(u) - -stack = [] -visit = [False]*n -scc = [] -component = [] - -def dfs(u): - global g, r, scc, component, visit, stack - if visit[u]: return - visit[u] = True - for v in g[u]: - dfs(v) - stack.append(u) - -def dfs2(u): - global g, r, scc, component, visit, stack - if visit[u]: return - visit[u] = True - component.append(u) - for v in r[u]: - dfs2(v) - -def kosaraju(): - global g, r, scc, component, visit, stack - for i in range(n): - dfs(i) - visit = [False]*n - for i in stack[::-1]: - if visit[i]: continue - component = [] - dfs2(i) - scc.append(component) - return scc - -print(kosaraju()) diff --git a/Graphs/tarjans_scc.py b/Graphs/tarjans_scc.py deleted file mode 100644 index 89754e593..000000000 --- a/Graphs/tarjans_scc.py +++ /dev/null @@ -1,78 +0,0 @@ -from collections import deque - - -def tarjan(g): - """ - Tarjan's algo for finding strongly connected components in a directed graph - - Uses two main attributes of each node to track reachability, the index of that node within a component(index), - and the lowest index reachable from that node(lowlink). - - We then perform a dfs of the each component making sure to update these parameters for each node and saving the - nodes we visit on the way. - - If ever we find that the lowest reachable node from a current node is equal to the index of the current node then it - must be the root of a strongly connected component and so we save it and it's equireachable vertices as a strongly - connected component. - - Complexity: strong_connect() is called at most once for each node and has a complexity of O(|E|) as it is DFS. - Therefore this has complexity O(|V| + |E|) for a graph G = (V, E) - - """ - - n = len(g) - stack = deque() - on_stack = [False for _ in range(n)] - index_of = [-1 for _ in range(n)] - lowlink_of = index_of[:] - - def strong_connect(v, index, components): - index_of[v] = index # the number when this node is seen - lowlink_of[v] = index # lowest rank node reachable from here - index += 1 - stack.append(v) - on_stack[v] = True - - for w in g[v]: - if index_of[w] == -1: - index = strong_connect(w, index, components) - lowlink_of[v] = lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v] - elif on_stack[w]: - lowlink_of[v] = lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v] - - if lowlink_of[v] == index_of[v]: - component = [] - w = stack.pop() - on_stack[w] = False - component.append(w) - while w != v: - w = stack.pop() - on_stack[w] = False - component.append(w) - components.append(component) - return index - - components = [] - for v in range(n): - if index_of[v] == -1: - strong_connect(v, 0, components) - - return components - - -def create_graph(n, edges): - g = [[] for _ in range(n)] - for u, v in edges: - g[u].append(v) - return g - - -if __name__ == '__main__': - # Test - n_vertices = 7 - source = [0, 0, 1, 2, 3, 3, 4, 4, 6] - target = [1, 3, 2, 0, 1, 4, 5, 6, 5] - edges = [(u, v) for u, v in zip(source, target)] - g = create_graph(n_vertices, edges) - - assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g) diff --git a/Maths/BasicMaths.py b/Maths/BasicMaths.py deleted file mode 100644 index 6e8c919a0..000000000 --- a/Maths/BasicMaths.py +++ /dev/null @@ -1,74 +0,0 @@ -import math - -def primeFactors(n): - pf = [] - while n % 2 == 0: - pf.append(2) - n = int(n / 2) - - for i in range(3, int(math.sqrt(n))+1, 2): - while n % i == 0: - pf.append(i) - n = int(n / i) - - if n > 2: - pf.append(n) - - return pf - -def numberOfDivisors(n): - div = 1 - - temp = 1 - while n % 2 == 0: - temp += 1 - n = int(n / 2) - div = div * (temp) - - for i in range(3, int(math.sqrt(n))+1, 2): - temp = 1 - while n % i == 0: - temp += 1 - n = int(n / i) - div = div * (temp) - - return div - -def sumOfDivisors(n): - s = 1 - - temp = 1 - while n % 2 == 0: - temp += 1 - n = int(n / 2) - if temp > 1: - s *= (2**temp - 1) / (2 - 1) - - for i in range(3, int(math.sqrt(n))+1, 2): - temp = 1 - while n % i == 0: - temp += 1 - n = int(n / i) - if temp > 1: - s *= (i**temp - 1) / (i - 1) - - return s - -def eulerPhi(n): - l = primeFactors(n) - l = set(l) - s = n - for x in l: - s *= (x - 1)/x - return s - -def main(): - print(primeFactors(100)) - print(numberOfDivisors(100)) - print(sumOfDivisors(100)) - print(eulerPhi(100)) - -if __name__ == '__main__': - main() - - \ No newline at end of file diff --git a/Maths/FibonacciSequenceRecursion.py b/Maths/FibonacciSequenceRecursion.py deleted file mode 100644 index b0b10fd07..000000000 --- a/Maths/FibonacciSequenceRecursion.py +++ /dev/null @@ -1,18 +0,0 @@ -# Fibonacci Sequence Using Recursion - -def recur_fibo(n): - return n if n <= 1 else (recur_fibo(n-1) + recur_fibo(n-2)) - -def isPositiveInteger(limit): - return limit >= 0 - -def main(): - limit = int(input("How many terms to include in fibonacci series: ")) - if isPositiveInteger(limit): - print("The first {limit} terms of the fibonacci series are as follows:") - print([recur_fibo(n) for n in range(limit)]) - else: - print("Please enter a positive integer: ") - -if __name__ == '__main__': - main() diff --git a/Maths/GreaterCommonDivisor.py b/Maths/GreaterCommonDivisor.py deleted file mode 100644 index 15adaca1f..000000000 --- a/Maths/GreaterCommonDivisor.py +++ /dev/null @@ -1,15 +0,0 @@ -# Greater Common Divisor - https://en.wikipedia.org/wiki/Greatest_common_divisor -def gcd(a, b): - return b if a == 0 else gcd(b % a, a) - -def main(): - try: - nums = input("Enter two Integers separated by comma (,): ").split(',') - num1 = int(nums[0]); num2 = int(nums[1]) - except (IndexError, UnboundLocalError, ValueError): - print("Wrong Input") - print(f"gcd({num1}, {num2}) = {gcd(num1, num2)}") - -if __name__ == '__main__': - main() - diff --git a/Maths/ModularExponential.py b/Maths/ModularExponential.py deleted file mode 100644 index b3f4c00bd..000000000 --- a/Maths/ModularExponential.py +++ /dev/null @@ -1,20 +0,0 @@ -def modularExponential(base, power, mod): - if power < 0: - return -1 - base %= mod - result = 1 - - while power > 0: - if power & 1: - result = (result * base) % mod - power = power >> 1 - base = (base * base) % mod - return result - - -def main(): - print(modularExponential(3, 200, 13)) - - -if __name__ == '__main__': - main() diff --git a/Maths/SegmentedSieve.py b/Maths/SegmentedSieve.py deleted file mode 100644 index 52ca6fbe6..000000000 --- a/Maths/SegmentedSieve.py +++ /dev/null @@ -1,46 +0,0 @@ -import math - -def sieve(n): - in_prime = [] - start = 2 - end = int(math.sqrt(n)) # Size of every segment - temp = [True] * (end + 1) - prime = [] - - while(start <= end): - if temp[start] == True: - in_prime.append(start) - for i in range(start*start, end+1, start): - if temp[i] == True: - temp[i] = False - start += 1 - prime += in_prime - - low = end + 1 - high = low + end - 1 - if high > n: - high = n - - while(low <= n): - temp = [True] * (high-low+1) - for each in in_prime: - - t = math.floor(low / each) * each - if t < low: - t += each - - for j in range(t, high+1, each): - temp[j - low] = False - - for j in range(len(temp)): - if temp[j] == True: - prime.append(j+low) - - low = high + 1 - high = low + end - 1 - if high > n: - high = n - - return prime - -print(sieve(10**6)) \ No newline at end of file diff --git a/Maths/SieveOfEratosthenes.py b/Maths/SieveOfEratosthenes.py deleted file mode 100644 index 2b132405a..000000000 --- a/Maths/SieveOfEratosthenes.py +++ /dev/null @@ -1,24 +0,0 @@ -import math -n = int(raw_input("Enter n: ")) - -def sieve(n): - l = [True] * (n+1) - prime = [] - start = 2 - end = int(math.sqrt(n)) - while(start <= end): - if l[start] == True: - prime.append(start) - for i in range(start*start, n+1, start): - if l[i] == True: - l[i] = False - start += 1 - - for j in range(end+1,n+1): - if l[j] == True: - prime.append(j) - - return prime - -print(sieve(n)) - \ No newline at end of file diff --git a/Maths/SimpsonRule.py b/Maths/SimpsonRule.py deleted file mode 100644 index 091c86c17..000000000 --- a/Maths/SimpsonRule.py +++ /dev/null @@ -1,49 +0,0 @@ - -''' -Numerical integration or quadrature for a smooth function f with known values at x_i - -This method is the classical approch of suming 'Equally Spaced Abscissas' - -method 2: -"Simpson Rule" - -''' -from __future__ import print_function - - -def method_2(boundary, steps): -# "Simpson Rule" -# int(f) = delta_x/2 * (b-a)/3*(f1 + 4f2 + 2f_3 + ... + fn) - h = (boundary[1] - boundary[0]) / steps - a = boundary[0] - b = boundary[1] - x_i = makePoints(a,b,h) - y = 0.0 - y += (h/3.0)*f(a) - cnt = 2 - for i in x_i: - y += (h/3)*(4-2*(cnt%2))*f(i) - cnt += 1 - y += (h/3.0)*f(b) - return y - -def makePoints(a,b,h): - x = a + h - while x < (b-h): - yield x - x = x + h - -def f(x): #enter your function here - y = (x-0)*(x-0) - return y - -def main(): - a = 0.0 #Lower bound of integration - b = 1.0 #Upper bound of integration - steps = 10.0 #define number of steps or resolution - boundary = [a, b] #define boundary of integration - y = method_2(boundary, steps) - print('y = {0}'.format(y)) - -if __name__ == '__main__': - main() diff --git a/Maths/TrapezoidalRule.py b/Maths/TrapezoidalRule.py deleted file mode 100644 index 52310c1ed..000000000 --- a/Maths/TrapezoidalRule.py +++ /dev/null @@ -1,46 +0,0 @@ -''' -Numerical integration or quadrature for a smooth function f with known values at x_i - -This method is the classical approch of suming 'Equally Spaced Abscissas' - -method 1: -"extended trapezoidal rule" - -''' -from __future__ import print_function - -def method_1(boundary, steps): -# "extended trapezoidal rule" -# int(f) = dx/2 * (f1 + 2f2 + ... + fn) - h = (boundary[1] - boundary[0]) / steps - a = boundary[0] - b = boundary[1] - x_i = makePoints(a,b,h) - y = 0.0 - y += (h/2.0)*f(a) - for i in x_i: - #print(i) - y += h*f(i) - y += (h/2.0)*f(b) - return y - -def makePoints(a,b,h): - x = a + h - while x < (b-h): - yield x - x = x + h - -def f(x): #enter your function here - y = (x-0)*(x-0) - return y - -def main(): - a = 0.0 #Lower bound of integration - b = 1.0 #Upper bound of integration - steps = 10.0 #define number of steps or resolution - boundary = [a, b] #define boundary of integration - y = method_1(boundary, steps) - print('y = {0}'.format(y)) - -if __name__ == '__main__': - main() diff --git a/Neural_Network/FCN.ipynb b/Neural_Network/FCN.ipynb deleted file mode 100644 index a8bcf4bee..000000000 --- a/Neural_Network/FCN.ipynb +++ /dev/null @@ -1,327 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Standard (Fully Connected) Neural Network" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "#Use in Markup cell type\n", - "#![alt text](imagename.png \"Title\") " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Implementing Fully connected Neural Net" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Loading Required packages and Data" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Using TensorFlow backend.\n" - ] - } - ], - "source": [ - "###1. Load Data and Splot Data\n", - "from keras.datasets import mnist\n", - "from keras.models import Sequential \n", - "from keras.layers.core import Dense, Activation\n", - "from keras.utils import np_utils\n", - "(X_train, Y_train), (X_test, Y_test) = mnist.load_data()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Preprocessing" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "import matplotlib.pyplot as plt\n", - "n = 10 # how many digits we will display\n", - "plt.figure(figsize=(20, 4))\n", - "for i in range(n):\n", - " # display original\n", - " ax = plt.subplot(2, n, i + 1)\n", - " plt.imshow(X_test[i].reshape(28, 28))\n", - " plt.gray()\n", - " ax.get_xaxis().set_visible(False)\n", - " ax.get_yaxis().set_visible(False)\n", - "plt.show()\n", - "plt.close()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Previous X_train shape: (60000, 28, 28) \n", - "Previous Y_train shape:(60000,)\n", - "New X_train shape: (60000, 784) \n", - "New Y_train shape:(60000, 10)\n" - ] - } - ], - "source": [ - "print(\"Previous X_train shape: {} \\nPrevious Y_train shape:{}\".format(X_train.shape, Y_train.shape))\n", - "X_train = X_train.reshape(60000, 784) \n", - "X_test = X_test.reshape(10000, 784)\n", - "X_train = X_train.astype('float32') \n", - "X_test = X_test.astype('float32') \n", - "X_train /= 255 \n", - "X_test /= 255\n", - "classes = 10\n", - "Y_train = np_utils.to_categorical(Y_train, classes) \n", - "Y_test = np_utils.to_categorical(Y_test, classes)\n", - "print(\"New X_train shape: {} \\nNew Y_train shape:{}\".format(X_train.shape, Y_train.shape))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Setting up parameters" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "input_size = 784\n", - "batch_size = 200 \n", - "hidden1 = 400\n", - "hidden2 = 20\n", - "epochs = 2" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Building the FCN Model" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "_________________________________________________________________\n", - "Layer (type) Output Shape Param # \n", - "=================================================================\n", - "dense_1 (Dense) (None, 400) 314000 \n", - "_________________________________________________________________\n", - "dense_2 (Dense) (None, 20) 8020 \n", - "_________________________________________________________________\n", - "dense_3 (Dense) (None, 10) 210 \n", - "=================================================================\n", - "Total params: 322,230\n", - "Trainable params: 322,230\n", - "Non-trainable params: 0\n", - "_________________________________________________________________\n" - ] - } - ], - "source": [ - "###4.Build the model\n", - "model = Sequential() \n", - "model.add(Dense(hidden1, input_dim=input_size, activation='relu'))\n", - "# output = relu (dot (W, input) + bias)\n", - "model.add(Dense(hidden2, activation='relu'))\n", - "model.add(Dense(classes, activation='softmax')) \n", - "\n", - "# Compilation\n", - "model.compile(loss='categorical_crossentropy', \n", - " metrics=['accuracy'], optimizer='sgd')\n", - "model.summary()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Training The Model" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Epoch 1/10\n", - " - 12s - loss: 1.4482 - acc: 0.6251\n", - "Epoch 2/10\n", - " - 3s - loss: 0.6239 - acc: 0.8482\n", - "Epoch 3/10\n", - " - 3s - loss: 0.4582 - acc: 0.8798\n", - "Epoch 4/10\n", - " - 3s - loss: 0.3941 - acc: 0.8936\n", - "Epoch 5/10\n", - " - 3s - loss: 0.3579 - acc: 0.9011\n", - "Epoch 6/10\n", - " - 4s - loss: 0.3328 - acc: 0.9070\n", - "Epoch 7/10\n", - " - 3s - loss: 0.3138 - acc: 0.9118\n", - "Epoch 8/10\n", - " - 3s - loss: 0.2980 - acc: 0.9157\n", - "Epoch 9/10\n", - " - 3s - loss: 0.2849 - acc: 0.9191\n", - "Epoch 10/10\n", - " - 3s - loss: 0.2733 - acc: 0.9223\n" - ] - }, - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Fitting on Data\n", - "model.fit(X_train, Y_train, batch_size=batch_size, epochs=10, verbose=2)\n", - "###5.Test " - ] - }, - { - "cell_type": "markdown", - "metadata": { - "collapsed": true - }, - "source": [ - "#### Testing The Model" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "10000/10000 [==============================] - 1s 121us/step\n", - "\n", - "Test accuracy: 0.9257\n", - "[0 6 9 0 1 5 9 7 3 4]\n" - ] - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAABHEAAABzCAYAAAAfb55ZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAHPJJREFUeJzt3XeYVNUZx/GzgBAQEAQVLKAuoQkmNJUIrkCKi4jUUESIgLTE8AASejcohhIeJVIEgVCCNAF5gokoIKCIVKVbQFoiCIhU4XHzB+H1Pce9w+zsnZ25M9/PX7/rOdw5OtzZ2et9z5uSkZFhAAAAAAAAEN9yxXoBAAAAAAAAuDZu4gAAAAAAAAQAN3EAAAAAAAACgJs4AAAAAAAAAcBNHAAAAAAAgADgJg4AAAAAAEAAcBMHAAAAAAAgALiJAwAAAAAAEADcxAEAAAAAAAiAPFmZnJKSkhGthSC0jIyMFD/Ow3sYU8czMjJu8uNEvI+xw7WYELgWEwDXYkLgWkwAXIsJgWsxAXAtJoSwrkWexAFyzoFYLwCAMYZrEYgXXItAfOBaBOJDWNciN3EAAAAAAAACgJs4AAAAAAAAAcBNHAAAAAAAgADgJg4AAAAAAEAAcBMHAAAAAAAgALiJAwAAAAAAEADcxAEAAAAAAAiAPLFeAJJTvnz5JK9bt84aq1KliuRly5ZJbtSoUfQXBgAAAABAnOJJHAAAAAAAgADgJg4AAAAAAEAAcBMHAAAAAAAgAAK/J06tWrWs4/fff19yuXLlJDdo0MCa9+ijj0pevny55/nXr18vee3atRGvE/Y+OOPGjZP885//3JqXkZEhedOmTdFfGAAkiaFDh0oeMmSINbZq1SrJderUyaEVIRzVqlWTrPeHa9q0qTVPf+9JSUmxxvTP1s2bN0vetWuXNW/kyJGSd+/eHeGKAcAfBQsWtI5vv/12yd26dfP8c9OmTZO8detW/xcGxBBP4gAAAAAAAAQAN3EAAAAAAAACIDDlVIULF5Y8e/ZsyXXr1rXmnT9/XnLevHklu4/iabVr1/Yc0+c7d+6cNda1a1fJCxYs8DwHrvjjH/8ouVOnTpLfeecda97gwYMlf/DBB9FfGIBMFS1aVLIue0xPT7fm9e7dW/L3339vjenPxgMHDkgeM2aMNe+///1v9haLsKSlpXmOPfzww5lmY+xSK0RO/+wzxpjy5ctLDvVdpGrVqpJ1WVSokqnJkydbY4sXL5b8r3/9K8wVA0DO07+36e8YxhgzcODAsM7RpUsXyfPmzbPGunfvLvnEiRORLBEJ5h//+IfkZcuWWWP63kO84EkcAAAAAACAAOAmDgAAAAAAQAAEppxq1KhRknVnKVf+/Pkl644Lx44ds+adPn3a8xz68WT9WvrcxhgzdepUyXv37rXGtm/f7nn+ZFWiRIlM//nbb79tHVNCBeSc6667TnKvXr2ssd///veSS5Ys6XkOXUKlyzmM+XH3nKuKFy9uHbdv3/7ai0W2uWVS4c6jnMofEydOtI719aJLtt2uUOPHj890zP1uo0umEHvuddSkSRPJ+rPx1ltvtebp7mHz58+3xl544QUfVwjEp379+knu27dvROfInTu35NatW1tjejuOp556SjKlpsklV64fnmfRfyd27twZi+VkCU/iAAAAAAAABAA3cQAAAAAAAAKAmzgAAAAAAAABELd74txzzz3WcbNmzTKdd+jQIeu4bdu2kj/99FPJp06dsuadOXPG87V1fZxud+22tNNtz4cMGWKNdezYUfLJkyc9XyuZFCpUSPKlS5cku3viIDHoltQjRoyQXL9+fWuevt5CtaceMGCA5KNHj1rz6tSpI3nlypXW2Pnz57Oy7KTTuXNnyc8991xE51i9erXkhx56KKw/oz+rjWFPnHgzdOjQWC8hIS1atMg6btSokWS9102NGjVybE3IPr3nn36P77vvPmue3nNRf3/ds2ePNa9UqVKS3c/lAwcOSJ47d26EK04s6enpkt944w3Jes+3a9HfFZYuXeo5T//313tV3X///da848ePS167dm3Y68AV+/fv9xzTe4lNmDDBGtuxY4dk/f4PHz7cmqev2SVLlkjWe7AaY8yLL74oWe9bhsRQpUoVye5ejfGOJ3EAAAAAAAACgJs4AAAAAAAAARC35VS69MYYY4oVKyZZP0bnPvbmRxtUXdKhHynPmzevNe/ZZ5+V3LhxY2ts2rRpkpcvX57tNQWR2zKzQ4cOktevXy9Zt9JEsOhHVdPS0qyx1157TbJuT+22oA63PbV+1PmOO+6w5uk2ru3atbPGZs2a5bn+ZKXLVQcNGpTlP++2+9SPlLuPLPfu3TvL5wcSVdeuXa3jatWqSS5durRkXU5jjDFffvlldBeGLHEfu9ff83Qpsfu+6fLVDRs2SP7mm2+sefpnnC71MMaY5s2bS543b16m/9wYY7Zs2SJ537591pj7szbo9LWTlRIqLX/+/JJbtGgR1p/p0aOH5+vq7zb6vTbGLhXXrYzdEiK3zC6Z6FJT1/z58yV37949rPNt27bNOl68eLHkG2+8UbL7nSg1NVWyW/att4aAf8qWLSt59OjRkp955hlrni5t9NvHH38ctXP7hSdxAAAAAAAAAoCbOAAAAAAAAAHATRwAAAAAAIAAiNs9cfLly+c5NmPGDMlua7lo6t+/v3Wsa2bvuusua6xJkyaSk3VPHLcle6w88MADkt29VDS3Xnbv3r1RW1OiqFq1quQVK1Z4ztMtwf/whz9YY6FaNuo697Nnz0p+6aWXrHnfffddpq+FK/QeOMYY8/zzz0vWezu4+yToeuOGDRtK3rVrlzVP1/4PHjzYGtN157ptq7unxPbt2yXfe++9mfxbwA/Dhg2TPGTIEM95botxWo7749ixY9bx5MmTJetW0u71wZ448cXd60vvg3PkyBHJ5cqVs+bpn1WhHDx4ULK7183Fixcl169fX/KcOXM8z1ewYEHrWO8xlwimTp0qWe9TUqZMGWteqOvoJz/5ieTHH388rNetUKGC5Jtuuskay5Xrh/9PXrNmTWvMPb7qwoUL1vFf/vIXyaE+rxOR/rutv2MYY39Whstt867fY/2dqFatWta81q1be57zqaeeknz58uUsrwmZ07+3NWjQQLL+/d8Yf/bEcT8jrjp8+HC2zx1tPIkDAAAAAAAQANzEAQAAAAAACIC4LacaMWKE55jbqi9W3nrrLcldunSxxvSjYMnq0Ucf9RzTj7764ZVXXvF87aJFi0rWLSRdp0+fto7HjRsnOdTfx2SjS3N0eYxr5cqVkvv16yc5Ky3ldZt63Wa1SJEi1jz9yLF+XVyhy96Msa8P/ci3+6j/3/72N8k7duwI67Xclpsffvih5OnTp0vu1auXNa9y5cqSdYmJMcZ06tQprNfGtSXbI/nxTl9/KSkpknWZhjsWii51DFWqiqxr2bKl5J49e1pjJ06ckKzfu3DLp0L57LPPrOOKFStKnjlzpuef0z8z3TKdRKN/7vjx/VJ//wulUqVKkn/1q195znNLcqpVq5bpPF3SZYzdPnvs2LHWmNuWPtG8/fbbkuvWrWuN6fL6SK1fv17yn/70J8nuFhj6dwj3fVy2bJnk119/PdtrwhXu+31VNEqc9PfLU6dOSc7K7yqxwpM4AAAAAAAAAcBNHAAAAAAAgACIq3Kqu+++W7IuozDGfmzw448/zrE1hfLOO+9IdsupklWBAgUk58lj//XSj8HpsopQ9DnckhDd9aZEiRLWmH5EXXcD0Y9nuucsVaqUNaYfsdOPLPuxG3qQDRo0SLLuoOI+gqofN//0008jei39qHKVKlU854XqjAVj0tPTrWPdhUp3fVi1apU1b8yYMb6uo2/fvp5r0u919erVfX1dIF64HWw6duwoWV+XbhcOXU6l57llVvrn4uzZsz3HkHW6a57+jmGMXW565syZqK7j0KFDYc379ttvJbudB+GPTz75JNPsckv+b7vtNsn652KHDh2seYULF5bsliC7nSATjS4N9SqvyYz+TNXlT5MmTQrrz8+dO9c67tatm+fcn/70p2GvC94KFSpkHderV0+yLlPT5fl+ue666yTr78NB6DbGkzgAAAAAAAABwE0cAAAAAACAAOAmDgAAAAAAQADE1Z44bdq0kaz3xzHGmIULF0rWbeEQX3Qt6i233GKNuW2Dvej9kPS+NAMHDvT8M0eOHLGO//73v0vWbZJD1ZK77bLr168vuWTJkpKTbU+cKVOmWMfNmzeXrNs86rpuYyLbB0fXphpjtybXez+sXr3amucew5hixYpJvu+++8L6M/q6iTb3tUaNGpVjrw3kJL0PjvtZpfdi0y1N9X4Qxhizdu3aTM/99NNPW8e6dXGTJk2sMb0viv5McF+L1uSZS01N9RzLyc+v3/zmN5Lz58/vOY+Wx/HDbfGu28brvzvunjh6X6Nw95JMFB999JHnmN6fym3L/vLLL0vW3ynT0tJ8XN0V+neePXv2SP73v/9tzUv0dvDZVbFiRetY7xm1YcMGyXrPmkgVKVLEOq5QoYJk932LdzyJAwAAAAAAEADcxAEAAAAAAAiAuCqnatmypWT30bPx48fn9HIQgVBtoPft2xfWOXTZVOfOnSW7LTJ1i/cePXpYY7rdZ7jCXV+ycds96/dBt1LduXNnROfXj7uOGDHCGqtdu3amrzt8+PCIXiuZ6LKKO++803Pee++9J9ltEx8rRYsWtY51OePRo0dzejlAtpQrVy7TbIwxixYtkqxLVcPllikXL15csi5RN8aYRo0aSdatWt3Pbr2O3bt3Z3lNiaJAgQLWcePGjT3nuiXdfsqbN691PHLkyEzH3NbmoVpeI348/vjjnmO69XKzZs2ssRdffDFqa4oHb7zxhmS3jEZ//3e3btCla26Jvt90Oey8efMkuyWpemuIJUuWWGOUrxpTq1YtzzG/t0to0aKFday3HlizZo2vrxVtPIkDAAAAAAAQANzEAQAAAAAACIC4KqfS3Ed4vTozIL7ozlLhKlu2rHXsPup2ldslqXv37pK/++67LL/utehOIToje9zSnm7duknu2bOn55/TZTRbt271fV2JRpdThTJkyBDJJ0+ejNZysuSOO+6wjitVqiSZcqqcMXTo0FgvIWHo7y+5c+eO6msdP35c8l//+ldrTB/rx/vdDlf6kfL09HRrbNOmTb6sM4ii/d5pugykbt261pjbvfWqadOmWcfJ1kkzSPR7GOqz9vTp05Ld78CJTv+7z5o1y3OeW0b4xBNPSP7tb38r+cYbb7Tm6Q60fnNLMfX63TLH1q1bS45kK4igypcvn2T9e4Axxpw4cUKyLqd/9dVXrXm6lO7666+X/NBDD3m+ru5063I7ncU7nsQBAAAAAAAIAG7iAAAAAAAABAA3cQAAAAAAAAIgpnvi6Po1Y6LfCg7Rp9shhqo71J555hnruEiRIpLnzJkjuWvXrtlcXWh67cYYc+nSJcnR2HMnKNz2s5UrV5asW/Nt2bIlrPPpFrjG2PsouW3ktZUrV0o+depUWK+VzHRNdqhr0e/2jZHKleuH/6fgthMF4C/dmly3OTfG/kxYvny5NaZ/Di9evDhKq4sPly9fto73798v2d3b7de//rXkbdu2Zfm19L4Pxhjz5JNPSn7++efDOsf06dOz/LqIjccee0yy+7uQpvfBiZc96+Kd/szS2d3Tyv3Of5Xbslx/L/3qq688X3fYsGGS27dvb43p72N6jz9jjBk7dqzkPn36SE70vR/1/jN33XWX57xly5ZJdr8b7tq1S7L+fP7nP//peb569ep5rmPkyJGSv/76a2vezJkzPc8ZKzyJAwAAAAAAEADcxAEAAAAAAAiAmJZT6dZvxhiTmpoqWbfJjFcNGzb0HHMfw00W+rHDUKUxmvsYsf5z7pjfdClPhw4drDH3EfNk1bFjR+u4cOHCknWLRl1mlRX6Omrbtq011rRpU8kTJ06M6PzJqkaNGpLDvRZjST8mG4T1AonC/b6lS6bGjBljjU2aNEly6dKlJbvtzBOBW0adlpYm2S0zHjVqlGRdWrVw4UJrXsWKFSXrco7atWtb83RJh261bIwxN9xwg+Qvv/xS8sGDBzP5t0A8KFOmjHX83HPPZTrv7Nmz1vHUqVOjtqZEpUv2y5YtK3n9+vXWPK+y/EjL9bt37y553rx51tgrr7wi2S2n+uUvfylZl06mp6dHtI6guHjxouR9+/ZZYzfffLNkXeI0Y8YMa16o8jYv+jPTGGNuv/12yXobjc6dO1vzKKcCAAAAAABARLiJAwAAAAAAEADcxAEAAAAAAAiAmO6JEzTVqlWzjhs0aOA5t3///tFeTsJw6w4ffPDBTHO/fv2sebpFqtsKLlx635tz585ZY+5eAMnq/Pnz1rFujfnwww9Lrl69uuc5duzYIdlt/TdhwgTJzZo1s8b27t0r+bPPPgtvwQi8M2fOWMeRXt8Asm7NmjWS3X0ZdPvx0aNHS07EPXFchw4dktymTRtrbMCAAZLr1q2baTbG3nPhiy++kLxq1Spr3ty5cyW/+eab1pjeM2zlypWST5w4EXL9yFl6bxZ9rRjj3VZ88ODB1vHu3bv9X1iC0d9JjbE/i/S+ly1btrTmLVmyJGprcvffqVWrluTNmzdbY3fffbfkmjVrSn7kkUeseStWrPBziTF34cIFyXoPR2OMyZPnh9sTfnyu3XbbbZKLFi1qjW3btk1yu3btJLu/E8YjnsQBAAAAAAAIAG7iAAAAAAAABADlVNegS6h69uxpjRUpUkTyunXrrLG33noruguLE/pRRWMiawnulkpUrVpV8tKlSyWPGDHCmqcfNXRL27799ttMxwYOHGjNq1KlimS35eMHH3xwzbUnO/0IuPs4eLi6dOki2W0tvXHjRsnHjh2L6PyIT247eW3o0KHWsfv4MSKnr1NdDuly3wP3GMnBbT++du1ayeXLl8/p5cQN/d3EGLtM2C2913Tb8lCfa7o1ct68eT3nLViwIOQ6ETt9+/aV3LBhQ895n3/+ueTx48dHdU2JqGDBgtax/r1EXzsLFy605ukSp2h/39e/k7Rq1coae//99yUXKlRIcp8+fax5iVZOpZ0+fTqq59e/L7qljLpcdfv27VFdh994EgcAAAAAACAAuIkDAAAAAAAQADEtp9q/f791rB83i6XcuXNLfvbZZyW3aNHCmnf48OFM5xljzOXLl6O0uvhy5MgR63jfvn2SS5cubY3pLg2TJk2S7O4AfvToUcl6x3K3ZGrXrl2SdWmbMXZnqQ4dOni+li6hcsu1EB133nmn55jblSgZOp5Ei36U230MV3fNmDZtmuT27dtHf2GZrMEYu1xu4sSJObYOAN7ckqlGjRpJ3rlzZ04vJ27prlN+lGbobiqhbNiwIduvBX+43Y969OjhOffs2bOS9TX1/fff+7+wBKc7uRljXzujRo2SnJKSYs3Tv+vlpJ/97GfWsbuuq4JW2hPP3I5UWqRbQcQDnsQBAAAAAAAIAG7iAAAAAAAABAA3cQAAAAAAAAIgpnvivPvuu9ax3mOmcOHC1pjeP8FteRmJe++9V3K3bt2sMd3iunr16p7naNOmjWTqkq/Q+88sX77cGqtfv75k3YJ97Nix1jy9J452//33W8f9+vXzHNM1pnv27JE8YMAAa97ixYszfS1Ez6BBgzzHli1bZh3TWjpyW7duldy7d29rbPr06ZKbN28u+eWXX7bm+f3ff8qUKZJvueUWa2z+/PmSL1y44OvrJjvdSjxUW3FEn7tPht4LatasWTm9nEzp/ez+/Oc/W2MFChSQrD874K9mzZrFegkIQ1pammS916Mx3nudGGPM7373O8mffPKJ7+tKZpMnT5asW0vXqVPHmjdz5kzJq1evlvzCCy9Y8/bu3ZvlNXTv3t067tixo+TU1FRrLNTfE0TfxYsXY72EiPEkDgAAAAAAQABwEwcAAAAAACAAYlpOFUqFChWsY90i16vcJiseeOABycWKFfOcp0u3li5dao1t3Lgx2+tINIcOHZKsH2M0xi6fq1mzpmRdRuHSjxlmZGSEvY7XXntNcp8+fSR//fXXYZ8D/rnnnnskN23a1HOeLrODf9atW2cdz5kzR3Lr1q0l60fDjfGnnEo/wty4cWPJX331lTVv+PDh2X4tZG7IkCGxXkJS03/vR48ebY3pR//9Lqe66aabPNcR6p/rknL3Om3btq3k3bt3Z3eJ+L9SpUpZx61atfKcu2bNGsmnT5+O2pqQuSJFikh+8803JV9//fWef2bChAnWsfv7BPyjrwndvn3btm3WvJIlS0pu166d5CeffNKaF0nb9zx5Ivv1Wv9eyXciXAtP4gAAAAAAAAQAN3EAAAAAAAACgJs4AAAAAAAAARBXe+Lo9s8DBw60xnSNtt/cescTJ05I1u2v3bZzCM3du0jvQ9SiRQvJZcqUseY9/fTTkl999VXJofbEmTp1qnVMrX580ddvoUKFrDH9vtJaOjo+//xz61i3eX/wwQclu3un6D01+vfv73n+smXLSq5Ro4Y1Nm7cOMl6L4ExY8ZY83bu3Ol5fmSN20Y83Lbiev+iVatW+bcgiFy57P931qlTJ8l6v7BFixZZ8/T+cOXLl5es9+0zxt4Dwm1dqz9r9diuXbusebNnz5Y8cuRIa8x9PfjDbTt8ww03eM5dsmSJ5MuXL0dtTbjCvWb1/imh9sHZtGmT5J49e1pjly5d8ml1COXMmTOS3WtMv48tW7aUXKlSJWverbfe6uua1q9fbx3rvSCnTJkimT08/fOLX/xCsvtzUf88Xbt2bY6tyQ88iQMAAAAAABAA3MQBAAAAAAAIgLgqp1q8eLHkDRs2WGO6xbj7qFsk9CNrW7ZsscYmTpyY7fPjx06dOiV50qRJnvN69+6dE8tBDipevLhktyxux44dkhcsWJBja0pm+/fvl6zLqdzPvm7duklOT0/3nKdbYRYrVszzdXU7Vt1aGTln2LBhkocOHRq7hSQR/d3mkUcescZ0+ZPmtv3WpY269ND9PNXXlVv6pNehueXH586dy3Qeoufmm2/2HHPfj5deeinay4GitwIwxi4RDmXUqFGSKZ+KPzNmzMg0lyhRwppXsGBBybr81Rhj3n33Xcm6lHzv3r3WvI8++kjywYMHrbGLFy9mZdmIgN7Gwf2ZefLkyZxejm94EgcAAAAAACAAuIkDAAAAAAAQACmhOv78aHJKSviT4auMjIyUa8+6Nt7DmNqUkZFR3Y8TBe191CWLlStXtsb69u0refTo0Tm2pkgl8rXodkQpV66cZN3RSpdWGfPjTlPawoULJW/evFlyjLuqJO21mEgS+VpMIlyLxpjXX3/dOtadytztBXSnlXiRaNdi4cKFJX/xxRfWWNGiRSXrTjfvvfeeNa9u3bqSA9JFjGsxASTateiHXr16Sa5du7Y11rp1a8lxVEoc1rXIkzgAAAAAAAABwE0cAAAAAACAAOAmDgAAAAAAQADEVYtxAIlJt8R198RB/Pjmm2+s4w8//FDyY489ltPLAYCk0KxZM+tY71ep95RDzqhXr55kvQeOS++D06pVK2ssIPvgAAlP79sYag/HoOFJHAAAAAAAgADgJg4AAAAAAEAAUE4FIOpWrFghOTU11RrbuHFjTi8HAIC4kSsX/081nugS8P/85z/W2L59+yQ/8cQTkg8fPhz9hQHA//FTAwAAAAAAIAC4iQMAAAAAABAA3MQBAAAAAAAIgBTdxvCak1NSwp8MX2VkZKT4cR7ew5jalJGRUd2PE/E+xg7XYkLgWkwAXIsJgWsxAXAtJgSuxQTAtZgQwroWeRIHAAAAAAAgALiJAwAAAAAAEABZbTF+3BhzIBoLQUilfTwX72Hs8D4GH+9hYuB9DD7ew8TA+xh8vIeJgfcx+HgPE0NY72OW9sQBAAAAAABAbFBOBQAAAAAAEADcxAEAAAAAAAgAbuIAAAAAAAAEADdxAAAAAAAAAoCbOAAAAAAAAAHATRwAAAAAAIAA4CYOAAAAAABAAHATBwAAAAAAIAC4iQMAAAAAABAA/wOj6vqySBf1wwAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "score = model.evaluate(X_test, Y_test, verbose=1)\n", - "print('\\n''Test accuracy:', score[1])\n", - "mask = range(10,20)\n", - "X_valid = X_test[mask]\n", - "y_pred = model.predict_classes(X_valid)\n", - "print(y_pred)\n", - "plt.figure(figsize=(20, 4))\n", - "for i in range(n):\n", - " # display original\n", - " ax = plt.subplot(2, n, i + 1)\n", - " plt.imshow(X_valid[i].reshape(28, 28))\n", - " plt.gray()\n", - " ax.get_xaxis().set_visible(False)\n", - " ax.get_yaxis().set_visible(False)\n", - "plt.show()\n", - "plt.close()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/Neural_Network/bpnn.py b/Neural_Network/bpnn.py deleted file mode 100644 index 0865e35f0..000000000 --- a/Neural_Network/bpnn.py +++ /dev/null @@ -1,193 +0,0 @@ -#!/usr/bin/python -# encoding=utf8 - -''' - -A Framework of Back Propagation Neural Network(BP) model - -Easy to use: - * add many layers as you want !!! - * clearly see how the loss decreasing -Easy to expand: - * more activation functions - * more loss functions - * more optimization method - -Author: Stephen Lee -Github : https://github.com/RiptideBo -Date: 2017.11.23 - -''' - -import numpy as np -import matplotlib.pyplot as plt - - -def sigmoid(x): - return 1 / (1 + np.exp(-1 * x)) - -class DenseLayer(): - ''' - Layers of BP neural network - ''' - def __init__(self,units,activation=None,learning_rate=None,is_input_layer=False): - ''' - common connected layer of bp network - :param units: numbers of neural units - :param activation: activation function - :param learning_rate: learning rate for paras - :param is_input_layer: whether it is input layer or not - ''' - self.units = units - self.weight = None - self.bias = None - self.activation = activation - if learning_rate is None: - learning_rate = 0.3 - self.learn_rate = learning_rate - self.is_input_layer = is_input_layer - - def initializer(self,back_units): - self.weight = np.asmatrix(np.random.normal(0,0.5,(self.units,back_units))) - self.bias = np.asmatrix(np.random.normal(0,0.5,self.units)).T - if self.activation is None: - self.activation = sigmoid - - def cal_gradient(self): - if self.activation == sigmoid: - gradient_mat = np.dot(self.output ,(1- self.output).T) - gradient_activation = np.diag(np.diag(gradient_mat)) - else: - gradient_activation = 1 - return gradient_activation - - def forward_propagation(self,xdata): - self.xdata = xdata - if self.is_input_layer: - # input layer - self.wx_plus_b = xdata - self.output = xdata - return xdata - else: - self.wx_plus_b = np.dot(self.weight,self.xdata) - self.bias - self.output = self.activation(self.wx_plus_b) - return self.output - - def back_propagation(self,gradient): - - gradient_activation = self.cal_gradient() # i * i 维 - gradient = np.asmatrix(np.dot(gradient.T,gradient_activation)) - - self._gradient_weight = np.asmatrix(self.xdata) - self._gradient_bias = -1 - self._gradient_x = self.weight - - self.gradient_weight = np.dot(gradient.T,self._gradient_weight.T) - self.gradient_bias = gradient * self._gradient_bias - self.gradient = np.dot(gradient,self._gradient_x).T - # ----------------------upgrade - # -----------the Negative gradient direction -------- - self.weight = self.weight - self.learn_rate * self.gradient_weight - self.bias = self.bias - self.learn_rate * self.gradient_bias.T - - return self.gradient - - -class BPNN(): - ''' - Back Propagation Neural Network model - ''' - def __init__(self): - self.layers = [] - self.train_mse = [] - self.fig_loss = plt.figure() - self.ax_loss = self.fig_loss.add_subplot(1,1,1) - - def add_layer(self,layer): - self.layers.append(layer) - - def build(self): - for i,layer in enumerate(self.layers[:]): - if i < 1: - layer.is_input_layer = True - else: - layer.initializer(self.layers[i-1].units) - - def summary(self): - for i,layer in enumerate(self.layers[:]): - print('------- layer %d -------'%i) - print('weight.shape ',np.shape(layer.weight)) - print('bias.shape ',np.shape(layer.bias)) - - def train(self,xdata,ydata,train_round,accuracy): - self.train_round = train_round - self.accuracy = accuracy - - self.ax_loss.hlines(self.accuracy, 0, self.train_round * 1.1) - - x_shape = np.shape(xdata) - for round_i in range(train_round): - all_loss = 0 - for row in range(x_shape[0]): - _xdata = np.asmatrix(xdata[row,:]).T - _ydata = np.asmatrix(ydata[row,:]).T - - # forward propagation - for layer in self.layers: - _xdata = layer.forward_propagation(_xdata) - - loss, gradient = self.cal_loss(_ydata, _xdata) - all_loss = all_loss + loss - - # back propagation - # the input_layer does not upgrade - for layer in self.layers[:0:-1]: - gradient = layer.back_propagation(gradient) - - mse = all_loss/x_shape[0] - self.train_mse.append(mse) - - self.plot_loss() - - if mse < self.accuracy: - print('----达到精度----') - return mse - - def cal_loss(self,ydata,ydata_): - self.loss = np.sum(np.power((ydata - ydata_),2)) - self.loss_gradient = 2 * (ydata_ - ydata) - # vector (shape is the same as _ydata.shape) - return self.loss,self.loss_gradient - - def plot_loss(self): - if self.ax_loss.lines: - self.ax_loss.lines.remove(self.ax_loss.lines[0]) - self.ax_loss.plot(self.train_mse, 'r-') - plt.ion() - plt.show() - plt.pause(0.1) - - - - -def example(): - - x = np.random.randn(10,10) - y = np.asarray([[0.8,0.4],[0.4,0.3],[0.34,0.45],[0.67,0.32], - [0.88,0.67],[0.78,0.77],[0.55,0.66],[0.55,0.43],[0.54,0.1], - [0.1,0.5]]) - - model = BPNN() - model.add_layer(DenseLayer(10)) - model.add_layer(DenseLayer(20)) - model.add_layer(DenseLayer(30)) - model.add_layer(DenseLayer(2)) - - model.build() - - model.summary() - - model.train(xdata=x,ydata=y,train_round=100,accuracy=0.01) - -if __name__ == '__main__': - example() diff --git a/Neural_Network/convolution_neural_network.py b/Neural_Network/convolution_neural_network.py deleted file mode 100644 index 0dca2bc48..000000000 --- a/Neural_Network/convolution_neural_network.py +++ /dev/null @@ -1,306 +0,0 @@ -#-*- coding: utf-8 -*- - -''' - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - Name - - CNN - Convolution Neural Network For Photo Recognizing - Goal - - Recognize Handing Writting Word Photo - Detail:Total 5 layers neural network - * Convolution layer - * Pooling layer - * Input layer layer of BP - * Hiden layer of BP - * Output layer of BP - Author: Stephen Lee - Github: 245885195@qq.com - Date: 2017.9.20 - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - ''' -from __future__ import print_function - -import numpy as np -import matplotlib.pyplot as plt - -class CNN(): - - def __init__(self,conv1_get,size_p1,bp_num1,bp_num2,bp_num3,rate_w=0.2,rate_t=0.2): - ''' - :param conv1_get: [a,c,d],size, number, step of convolution kernel - :param size_p1: pooling size - :param bp_num1: units number of flatten layer - :param bp_num2: units number of hidden layer - :param bp_num3: units number of output layer - :param rate_w: rate of weight learning - :param rate_t: rate of threshold learning - ''' - self.num_bp1 = bp_num1 - self.num_bp2 = bp_num2 - self.num_bp3 = bp_num3 - self.conv1 = conv1_get[:2] - self.step_conv1 = conv1_get[2] - self.size_pooling1 = size_p1 - self.rate_weight = rate_w - self.rate_thre = rate_t - self.w_conv1 = [np.mat(-1*np.random.rand(self.conv1[0],self.conv1[0])+0.5) for i in range(self.conv1[1])] - self.wkj = np.mat(-1 * np.random.rand(self.num_bp3, self.num_bp2) + 0.5) - self.vji = np.mat(-1*np.random.rand(self.num_bp2, self.num_bp1)+0.5) - self.thre_conv1 = -2*np.random.rand(self.conv1[1])+1 - self.thre_bp2 = -2*np.random.rand(self.num_bp2)+1 - self.thre_bp3 = -2*np.random.rand(self.num_bp3)+1 - - - def save_model(self,save_path): - #save model dict with pickle - import pickle - model_dic = {'num_bp1':self.num_bp1, - 'num_bp2':self.num_bp2, - 'num_bp3':self.num_bp3, - 'conv1':self.conv1, - 'step_conv1':self.step_conv1, - 'size_pooling1':self.size_pooling1, - 'rate_weight':self.rate_weight, - 'rate_thre':self.rate_thre, - 'w_conv1':self.w_conv1, - 'wkj':self.wkj, - 'vji':self.vji, - 'thre_conv1':self.thre_conv1, - 'thre_bp2':self.thre_bp2, - 'thre_bp3':self.thre_bp3} - with open(save_path, 'wb') as f: - pickle.dump(model_dic, f) - - print('Model saved: %s'% save_path) - - @classmethod - def ReadModel(cls,model_path): - #read saved model - import pickle - with open(model_path, 'rb') as f: - model_dic = pickle.load(f) - - conv_get= model_dic.get('conv1') - conv_get.append(model_dic.get('step_conv1')) - size_p1 = model_dic.get('size_pooling1') - bp1 = model_dic.get('num_bp1') - bp2 = model_dic.get('num_bp2') - bp3 = model_dic.get('num_bp3') - r_w = model_dic.get('rate_weight') - r_t = model_dic.get('rate_thre') - #create model instance - conv_ins = CNN(conv_get,size_p1,bp1,bp2,bp3,r_w,r_t) - #modify model parameter - conv_ins.w_conv1 = model_dic.get('w_conv1') - conv_ins.wkj = model_dic.get('wkj') - conv_ins.vji = model_dic.get('vji') - conv_ins.thre_conv1 = model_dic.get('thre_conv1') - conv_ins.thre_bp2 = model_dic.get('thre_bp2') - conv_ins.thre_bp3 = model_dic.get('thre_bp3') - return conv_ins - - - def sig(self,x): - return 1 / (1 + np.exp(-1*x)) - - def do_round(self,x): - return round(x, 3) - - def convolute(self,data,convs,w_convs,thre_convs,conv_step): - #convolution process - size_conv = convs[0] - num_conv =convs[1] - size_data = np.shape(data)[0] - #get the data slice of original image data, data_focus - data_focus = [] - for i_focus in range(0, size_data - size_conv + 1, conv_step): - for j_focus in range(0, size_data - size_conv + 1, conv_step): - focus = data[i_focus:i_focus + size_conv, j_focus:j_focus + size_conv] - data_focus.append(focus) - #caculate the feature map of every single kernel, and saved as list of matrix - data_featuremap = [] - Size_FeatureMap = int((size_data - size_conv) / conv_step + 1) - for i_map in range(num_conv): - featuremap = [] - for i_focus in range(len(data_focus)): - net_focus = np.sum(np.multiply(data_focus[i_focus], w_convs[i_map])) - thre_convs[i_map] - featuremap.append(self.sig(net_focus)) - featuremap = np.asmatrix(featuremap).reshape(Size_FeatureMap, Size_FeatureMap) - data_featuremap.append(featuremap) - - #expanding the data slice to One dimenssion - focus1_list = [] - for each_focus in data_focus: - focus1_list.extend(self.Expand_Mat(each_focus)) - focus_list = np.asarray(focus1_list) - return focus_list,data_featuremap - - def pooling(self,featuremaps,size_pooling,type='average_pool'): - #pooling process - size_map = len(featuremaps[0]) - size_pooled = int(size_map/size_pooling) - featuremap_pooled = [] - for i_map in range(len(featuremaps)): - map = featuremaps[i_map] - map_pooled = [] - for i_focus in range(0,size_map,size_pooling): - for j_focus in range(0, size_map, size_pooling): - focus = map[i_focus:i_focus + size_pooling, j_focus:j_focus + size_pooling] - if type == 'average_pool': - #average pooling - map_pooled.append(np.average(focus)) - elif type == 'max_pooling': - #max pooling - map_pooled.append(np.max(focus)) - map_pooled = np.asmatrix(map_pooled).reshape(size_pooled,size_pooled) - featuremap_pooled.append(map_pooled) - return featuremap_pooled - - def _expand(self,datas): - #expanding three dimension data to one dimension list - data_expanded = [] - for i in range(len(datas)): - shapes = np.shape(datas[i]) - data_listed = datas[i].reshape(1,shapes[0]*shapes[1]) - data_listed = data_listed.getA().tolist()[0] - data_expanded.extend(data_listed) - data_expanded = np.asarray(data_expanded) - return data_expanded - - def _expand_mat(self,data_mat): - #expanding matrix to one dimension list - data_mat = np.asarray(data_mat) - shapes = np.shape(data_mat) - data_expanded = data_mat.reshape(1,shapes[0]*shapes[1]) - return data_expanded - - def _calculate_gradient_from_pool(self,out_map,pd_pool,num_map,size_map,size_pooling): - ''' - calcluate the gradient from the data slice of pool layer - pd_pool: list of matrix - out_map: the shape of data slice(size_map*size_map) - return: pd_all: list of matrix, [num, size_map, size_map] - ''' - pd_all = [] - i_pool = 0 - for i_map in range(num_map): - pd_conv1 = np.ones((size_map, size_map)) - for i in range(0, size_map, size_pooling): - for j in range(0, size_map, size_pooling): - pd_conv1[i:i + size_pooling, j:j + size_pooling] = pd_pool[i_pool] - i_pool = i_pool + 1 - pd_conv2 = np.multiply(pd_conv1,np.multiply(out_map[i_map],(1-out_map[i_map]))) - pd_all.append(pd_conv2) - return pd_all - - def trian(self,patterns,datas_train, datas_teach, n_repeat, error_accuracy,draw_e = bool): - #model traning - print('----------------------Start Training-------------------------') - print((' - - Shape: Train_Data ',np.shape(datas_train))) - print((' - - Shape: Teach_Data ',np.shape(datas_teach))) - rp = 0 - all_mse = [] - mse = 10000 - while rp < n_repeat and mse >= error_accuracy: - alle = 0 - print('-------------Learning Time %d--------------'%rp) - for p in range(len(datas_train)): - #print('------------Learning Image: %d--------------'%p) - data_train = np.asmatrix(datas_train[p]) - data_teach = np.asarray(datas_teach[p]) - data_focus1,data_conved1 = self.convolute(data_train,self.conv1,self.w_conv1, - self.thre_conv1,conv_step=self.step_conv1) - data_pooled1 = self.pooling(data_conved1,self.size_pooling1) - shape_featuremap1 = np.shape(data_conved1) - ''' - print(' -----original shape ', np.shape(data_train)) - print(' ---- after convolution ',np.shape(data_conv1)) - print(' -----after pooling ',np.shape(data_pooled1)) - ''' - data_bp_input = self._expand(data_pooled1) - bp_out1 = data_bp_input - - bp_net_j = np.dot(bp_out1,self.vji.T) - self.thre_bp2 - bp_out2 = self.sig(bp_net_j) - bp_net_k = np.dot(bp_out2 ,self.wkj.T) - self.thre_bp3 - bp_out3 = self.sig(bp_net_k) - - #--------------Model Leaning ------------------------ - # calcluate error and gradient--------------- - pd_k_all = np.multiply((data_teach - bp_out3), np.multiply(bp_out3, (1 - bp_out3))) - pd_j_all = np.multiply(np.dot(pd_k_all,self.wkj), np.multiply(bp_out2, (1 - bp_out2))) - pd_i_all = np.dot(pd_j_all,self.vji) - - pd_conv1_pooled = pd_i_all / (self.size_pooling1*self.size_pooling1) - pd_conv1_pooled = pd_conv1_pooled.T.getA().tolist() - pd_conv1_all = self._calculate_gradient_from_pool(data_conved1,pd_conv1_pooled,shape_featuremap1[0], - shape_featuremap1[1],self.size_pooling1) - #weight and threshold learning process--------- - #convolution layer - for k_conv in range(self.conv1[1]): - pd_conv_list = self._expand_mat(pd_conv1_all[k_conv]) - delta_w = self.rate_weight * np.dot(pd_conv_list,data_focus1) - - self.w_conv1[k_conv] = self.w_conv1[k_conv] + delta_w.reshape((self.conv1[0],self.conv1[0])) - - self.thre_conv1[k_conv] = self.thre_conv1[k_conv] - np.sum(pd_conv1_all[k_conv]) * self.rate_thre - #all connected layer - self.wkj = self.wkj + pd_k_all.T * bp_out2 * self.rate_weight - self.vji = self.vji + pd_j_all.T * bp_out1 * self.rate_weight - self.thre_bp3 = self.thre_bp3 - pd_k_all * self.rate_thre - self.thre_bp2 = self.thre_bp2 - pd_j_all * self.rate_thre - # calculate the sum error of all single image - errors = np.sum(abs((data_teach - bp_out3))) - alle = alle + errors - #print(' ----Teach ',data_teach) - #print(' ----BP_output ',bp_out3) - rp = rp + 1 - mse = alle/patterns - all_mse.append(mse) - def draw_error(): - yplot = [error_accuracy for i in range(int(n_repeat * 1.2))] - plt.plot(all_mse, '+-') - plt.plot(yplot, 'r--') - plt.xlabel('Learning Times') - plt.ylabel('All_mse') - plt.grid(True, alpha=0.5) - plt.show() - print('------------------Training Complished---------------------') - print((' - - Training epoch: ', rp, ' - - Mse: %.6f' % mse)) - if draw_e: - draw_error() - return mse - - def predict(self,datas_test): - #model predict - produce_out = [] - print('-------------------Start Testing-------------------------') - print((' - - Shape: Test_Data ',np.shape(datas_test))) - for p in range(len(datas_test)): - data_test = np.asmatrix(datas_test[p]) - data_focus1, data_conved1 = self.convolute(data_test, self.conv1, self.w_conv1, - self.thre_conv1, conv_step=self.step_conv1) - data_pooled1 = self.pooling(data_conved1, self.size_pooling1) - data_bp_input = self._expand(data_pooled1) - - bp_out1 = data_bp_input - bp_net_j = bp_out1 * self.vji.T - self.thre_bp2 - bp_out2 = self.sig(bp_net_j) - bp_net_k = bp_out2 * self.wkj.T - self.thre_bp3 - bp_out3 = self.sig(bp_net_k) - produce_out.extend(bp_out3.getA().tolist()) - res = [list(map(self.do_round,each)) for each in produce_out] - return np.asarray(res) - - def convolution(self,data): - #return the data of image after convoluting process so we can check it out - data_test = np.asmatrix(data) - data_focus1, data_conved1 = self.convolute(data_test, self.conv1, self.w_conv1, - self.thre_conv1, conv_step=self.step_conv1) - data_pooled1 = self.pooling(data_conved1, self.size_pooling1) - - return data_conved1,data_pooled1 - - -if __name__ == '__main__': - pass - ''' - I will put the example on other file - ''' \ No newline at end of file diff --git a/Neural_Network/perceptron.py b/Neural_Network/perceptron.py deleted file mode 100644 index 16e632f8d..000000000 --- a/Neural_Network/perceptron.py +++ /dev/null @@ -1,124 +0,0 @@ -''' - - Perceptron - w = w + N * (d(k) - y) * x(k) - - Using perceptron network for oil analysis, - with Measuring of 3 parameters that represent chemical characteristics we can classify the oil, in p1 or p2 - p1 = -1 - p2 = 1 - -''' -from __future__ import print_function - -import random - - -class Perceptron: - def __init__(self, sample, exit, learn_rate=0.01, epoch_number=1000, bias=-1): - self.sample = sample - self.exit = exit - self.learn_rate = learn_rate - self.epoch_number = epoch_number - self.bias = bias - self.number_sample = len(sample) - self.col_sample = len(sample[0]) - self.weight = [] - - def training(self): - for sample in self.sample: - sample.insert(0, self.bias) - - for i in range(self.col_sample): - self.weight.append(random.random()) - - self.weight.insert(0, self.bias) - - epoch_count = 0 - - while True: - erro = False - for i in range(self.number_sample): - u = 0 - for j in range(self.col_sample + 1): - u = u + self.weight[j] * self.sample[i][j] - y = self.sign(u) - if y != self.exit[i]: - - for j in range(self.col_sample + 1): - - self.weight[j] = self.weight[j] + self.learn_rate * (self.exit[i] - y) * self.sample[i][j] - erro = True - #print('Epoch: \n',epoch_count) - epoch_count = epoch_count + 1 - # if you want controle the epoch or just by erro - if erro == False: - print(('\nEpoch:\n',epoch_count)) - print('------------------------\n') - #if epoch_count > self.epoch_number or not erro: - break - - def sort(self, sample): - sample.insert(0, self.bias) - u = 0 - for i in range(self.col_sample + 1): - u = u + self.weight[i] * sample[i] - - y = self.sign(u) - - if y == -1: - print(('Sample: ', sample)) - print('classification: P1') - else: - print(('Sample: ', sample)) - print('classification: P2') - - def sign(self, u): - return 1 if u >= 0 else -1 - - -samples = [ - [-0.6508, 0.1097, 4.0009], - [-1.4492, 0.8896, 4.4005], - [2.0850, 0.6876, 12.0710], - [0.2626, 1.1476, 7.7985], - [0.6418, 1.0234, 7.0427], - [0.2569, 0.6730, 8.3265], - [1.1155, 0.6043, 7.4446], - [0.0914, 0.3399, 7.0677], - [0.0121, 0.5256, 4.6316], - [-0.0429, 0.4660, 5.4323], - [0.4340, 0.6870, 8.2287], - [0.2735, 1.0287, 7.1934], - [0.4839, 0.4851, 7.4850], - [0.4089, -0.1267, 5.5019], - [1.4391, 0.1614, 8.5843], - [-0.9115, -0.1973, 2.1962], - [0.3654, 1.0475, 7.4858], - [0.2144, 0.7515, 7.1699], - [0.2013, 1.0014, 6.5489], - [0.6483, 0.2183, 5.8991], - [-0.1147, 0.2242, 7.2435], - [-0.7970, 0.8795, 3.8762], - [-1.0625, 0.6366, 2.4707], - [0.5307, 0.1285, 5.6883], - [-1.2200, 0.7777, 1.7252], - [0.3957, 0.1076, 5.6623], - [-0.1013, 0.5989, 7.1812], - [2.4482, 0.9455, 11.2095], - [2.0149, 0.6192, 10.9263], - [0.2012, 0.2611, 5.4631] - -] - -exit = [-1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1] - -network = Perceptron(sample=samples, exit = exit, learn_rate=0.01, epoch_number=1000, bias=-1) - -network.trannig() - -while True: - sample = [] - for i in range(3): - sample.insert(i, float(raw_input('value: '))) - network.sort(sample) diff --git a/Project Euler/Problem 01/sol1.py b/Project Euler/Problem 01/sol1.py deleted file mode 100644 index 27031c3cf..000000000 --- a/Project Euler/Problem 01/sol1.py +++ /dev/null @@ -1,17 +0,0 @@ -''' -Problem Statement: -If we list all the natural numbers below 10 that are multiples of 3 or 5, -we get 3,5,6 and 9. The sum of these multiples is 23. -Find the sum of all the multiples of 3 or 5 below N. -''' -from __future__ import print_function -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 -n = int(raw_input().strip()) -sum=0 -for a in range(3,n): - if(a%3==0 or a%5==0): - sum+=a -print(sum) diff --git a/Project Euler/Problem 01/sol2.py b/Project Euler/Problem 01/sol2.py deleted file mode 100644 index 2b7760e0b..000000000 --- a/Project Euler/Problem 01/sol2.py +++ /dev/null @@ -1,20 +0,0 @@ -''' -Problem Statement: -If we list all the natural numbers below 10 that are multiples of 3 or 5, -we get 3,5,6 and 9. The sum of these multiples is 23. -Find the sum of all the multiples of 3 or 5 below N. -''' -from __future__ import print_function -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 -n = int(raw_input().strip()) -sum = 0 -terms = (n-1)//3 -sum+= ((terms)*(6+(terms-1)*3))//2 #sum of an A.P. -terms = (n-1)//5 -sum+= ((terms)*(10+(terms-1)*5))//2 -terms = (n-1)//15 -sum-= ((terms)*(30+(terms-1)*15))//2 -print(sum) diff --git a/Project Euler/Problem 01/sol3.py b/Project Euler/Problem 01/sol3.py deleted file mode 100644 index f4f3aefcc..000000000 --- a/Project Euler/Problem 01/sol3.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import print_function - -''' -Problem Statement: -If we list all the natural numbers below 10 that are multiples of 3 or 5, -we get 3,5,6 and 9. The sum of these multiples is 23. -Find the sum of all the multiples of 3 or 5 below N. -''' -''' -This solution is based on the pattern that the successive numbers in the series follow: 0+3,+2,+1,+3,+1,+2,+3. -''' - -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 -n = int(raw_input().strip()) -sum=0 -num=0 -while(1): - num+=3 - if(num>=n): - break - sum+=num - num+=2 - if(num>=n): - break - sum+=num - num+=1 - if(num>=n): - break - sum+=num - num+=3 - if(num>=n): - break - sum+=num - num+=1 - if(num>=n): - break - sum+=num - num+=2 - if(num>=n): - break - sum+=num - num+=3 - if(num>=n): - break - sum+=num - -print(sum); diff --git a/Project Euler/Problem 01/sol4.py b/Project Euler/Problem 01/sol4.py deleted file mode 100644 index 7941f5fcd..000000000 --- a/Project Euler/Problem 01/sol4.py +++ /dev/null @@ -1,30 +0,0 @@ -def mulitples(limit): - xmulti = [] - zmulti = [] - z = 3 - x = 5 - temp = 1 - while True: - result = z * temp - if (result < limit): - zmulti.append(result) - temp += 1 - else: - temp = 1 - break - while True: - result = x * temp - if (result < limit): - xmulti.append(result) - temp += 1 - else: - break - collection = list(set(xmulti+zmulti)) - return (sum(collection)) - - - - - - -print (mulitples(1000)) diff --git a/Project Euler/Problem 02/sol1.py b/Project Euler/Problem 02/sol1.py deleted file mode 100644 index f8257fb61..000000000 --- a/Project Euler/Problem 02/sol1.py +++ /dev/null @@ -1,26 +0,0 @@ -''' -Problem: -Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, -the first 10 terms will be: - 1,2,3,5,8,13,21,34,55,89,.. -By considering the terms in the Fibonacci sequence whose values do not exceed n, find the sum of the even-valued terms. -e.g. for n=10, we have {2,8}, sum is 10. -''' -from __future__ import print_function - -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 - -n = int(raw_input().strip()) -i=1 -j=2 -sum=0 -while(j<=n): - if((j&1)==0): #can also use (j%2==0) - sum+=j - temp=i - i=j - j=temp+i -print(sum) diff --git a/Project Euler/Problem 02/sol2.py b/Project Euler/Problem 02/sol2.py deleted file mode 100644 index aa8dc7f76..000000000 --- a/Project Euler/Problem 02/sol2.py +++ /dev/null @@ -1,12 +0,0 @@ -def fib(n): - a, b, s = 0, 1, 0 - while b < n: - if b % 2 == 0 and b < n: s += b - a, b = b, a+b - ls.append(s) - -T = int(input().strip()) -ls = [] -for _ in range(T): - fib(int(input().strip())) -print(ls, sep = '\n') diff --git a/Project Euler/Problem 02/sol3.py b/Project Euler/Problem 02/sol3.py deleted file mode 100644 index ede5e196b..000000000 --- a/Project Euler/Problem 02/sol3.py +++ /dev/null @@ -1,20 +0,0 @@ -''' -Problem: -Each new term in the Fibonacci sequence is generated by adding the previous two terms. - 0,1,1,2,3,5,8,13,21,34,55,89,.. -Every third term from 0 is even So using this I have written a simple code -By considering the terms in the Fibonacci sequence whose values do not exceed n, find the sum of the even-valued terms. -e.g. for n=10, we have {2,8}, sum is 10. -''' -"""Python 3""" -n = int(raw_input()) -a=0 -b=2 -count=0 -while 4*b+a1): - prime=n -print(prime) diff --git a/Project Euler/Problem 04/sol1.py b/Project Euler/Problem 04/sol1.py deleted file mode 100644 index 27490130c..000000000 --- a/Project Euler/Problem 04/sol1.py +++ /dev/null @@ -1,29 +0,0 @@ -''' -Problem: -A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99. -Find the largest palindrome made from the product of two 3-digit numbers which is less than N. -''' -from __future__ import print_function -limit = int(raw_input("limit? ")) - -# fetchs the next number -for number in range(limit-1,10000,-1): - - # converts number into string. - strNumber = str(number) - - # checks whether 'strNumber' is a palindrome. - if(strNumber == strNumber[::-1]): - - divisor = 999 - - # if 'number' is a product of two 3-digit numbers - # then number is the answer otherwise fetch next number. - while(divisor != 99): - - if((number % divisor == 0) and (len(str(number / divisor)) == 3)): - - print(number) - exit(0) - - divisor -=1 \ No newline at end of file diff --git a/Project Euler/Problem 04/sol2.py b/Project Euler/Problem 04/sol2.py deleted file mode 100644 index a7e486d38..000000000 --- a/Project Euler/Problem 04/sol2.py +++ /dev/null @@ -1,19 +0,0 @@ -''' -Problem: -A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99. -Find the largest palindrome made from the product of two 3-digit numbers which is less than N. -''' -from __future__ import print_function -arr = [] -for i in range(999,100,-1): - for j in range(999,100,-1): - t = str(i*j) - if t == t[::-1]: - arr.append(i*j) -arr.sort() - -n=int(raw_input()) -for i in arr[::-1]: - if(i LargestProduct: - LargestProduct = product - print(LargestProduct) - - -if __name__ == '__main__': - main() diff --git a/Project Euler/Problem 09/sol1.py b/Project Euler/Problem 09/sol1.py deleted file mode 100644 index e54c543b4..000000000 --- a/Project Euler/Problem 09/sol1.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import print_function -# Program to find the product of a,b,c which are Pythagorean Triplet that satisfice the following: -# 1. a < b < c -# 2. a**2 + b**2 = c**2 -# 3. a + b + c = 1000 - -print("Please Wait...") -for a in range(300): - for b in range(400): - for c in range(500): - if(a < b < c): - if((a**2) + (b**2) == (c**2)): - if((a+b+c) == 1000): - print(("Product of",a,"*",b,"*",c,"=",(a*b*c))) - break diff --git a/Project Euler/Problem 09/sol2.py b/Project Euler/Problem 09/sol2.py deleted file mode 100644 index c02662d89..000000000 --- a/Project Euler/Problem 09/sol2.py +++ /dev/null @@ -1,18 +0,0 @@ -"""A Pythagorean triplet is a set of three natural numbers, for which, -a^2+b^2=c^2 -Given N, Check if there exists any Pythagorean triplet for which a+b+c=N -Find maximum possible value of product of a,b,c among all such Pythagorean triplets, If there is no such Pythagorean triplet print -1.""" -#!/bin/python3 - -product=-1 -d=0 -N = int(raw_input()) -for a in range(1,N//3): - """Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c """ - b=(N*N-2*a*N)//(2*N-2*a) - c=N-a-b - if c*c==(a*a+b*b): - d=(a*b*c) - if d>=product: - product=d -print(product) diff --git a/Project Euler/Problem 10/sol1.py b/Project Euler/Problem 10/sol1.py deleted file mode 100644 index 94e5b7362..000000000 --- a/Project Euler/Problem 10/sol1.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import print_function -from math import sqrt - -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def is_prime(n): - for i in xrange(2, int(sqrt(n))+1): - if n%i == 0: - return False - - return True - -def sum_of_primes(n): - if n > 2: - sumOfPrimes = 2 - else: - return 0 - - for i in xrange(3, n, 2): - if is_prime(i): - sumOfPrimes += i - - return sumOfPrimes - -if __name__ == '__main__': - import sys - - if len(sys.argv) == 1: - print(sum_of_primes(2000000)) - else: - try: - n = int(sys.argv[1]) - print(sum_of_primes(n)) - except ValueError: - print('Invalid entry - please enter a number.') diff --git a/Project Euler/Problem 11/grid.txt b/Project Euler/Problem 11/grid.txt deleted file mode 100644 index 1fc75c66a..000000000 --- a/Project Euler/Problem 11/grid.txt +++ /dev/null @@ -1,20 +0,0 @@ -08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 -49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 -81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 -52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 -22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 -24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 -32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 -67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 -24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 -21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 -78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 -16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 -86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 -19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 -04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 -88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 -04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 -20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 -20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 -01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 \ No newline at end of file diff --git a/Project Euler/Problem 11/sol1.py b/Project Euler/Problem 11/sol1.py deleted file mode 100644 index b882dc449..000000000 --- a/Project Euler/Problem 11/sol1.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import print_function -''' -What is the greatest product of four adjacent numbers (horizontally, vertically, or diagonally) in this 20x20 array? - -08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 -49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 -81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 -52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 -22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 -24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 -32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 -67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 -24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 -21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 -78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 -16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 -86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 -19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 -04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 -88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 -04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 -20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 -20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 -01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 -''' - -try: - xrange #Python 2 -except NameError: - xrange = range #Python 2 - -def largest_product(grid): - nColumns = len(grid[0]) - nRows = len(grid) - - largest = 0 - lrDiagProduct = 0 - rlDiagProduct = 0 - - #Check vertically, horizontally, diagonally at the same time (only works for nxn grid) - for i in xrange(nColumns): - for j in xrange(nRows-3): - vertProduct = grid[j][i]*grid[j+1][i]*grid[j+2][i]*grid[j+3][i] - horzProduct = grid[i][j]*grid[i][j+1]*grid[i][j+2]*grid[i][j+3] - - #Left-to-right diagonal (\) product - if (i < nColumns-3): - lrDiagProduct = grid[i][j]*grid[i+1][j+1]*grid[i+2][j+2]*grid[i+3][j+3] - - #Right-to-left diagonal(/) product - if (i > 2): - rlDiagProduct = grid[i][j]*grid[i-1][j+1]*grid[i-2][j+2]*grid[i-3][j+3] - - maxProduct = max(vertProduct, horzProduct, lrDiagProduct, rlDiagProduct) - if maxProduct > largest: - largest = maxProduct - - return largest - -if __name__ == '__main__': - grid = [] - with open('grid.txt') as file: - for line in file: - grid.append(line.strip('\n').split(' ')) - - grid = [[int(i) for i in grid[j]] for j in xrange(len(grid))] - - print(largest_product(grid)) \ No newline at end of file diff --git a/Project Euler/Problem 11/sol2.py b/Project Euler/Problem 11/sol2.py deleted file mode 100644 index b03395f01..000000000 --- a/Project Euler/Problem 11/sol2.py +++ /dev/null @@ -1,39 +0,0 @@ -def main(): - with open ("grid.txt", "r") as f: - l = [] - for i in range(20): - l.append([int(x) for x in f.readline().split()]) - - maximum = 0 - - # right - for i in range(20): - for j in range(17): - temp = l[i][j] * l[i][j+1] * l[i][j+2] * l[i][j+3] - if temp > maximum: - maximum = temp - - # down - for i in range(17): - for j in range(20): - temp = l[i][j] * l[i+1][j] * l[i+2][j] * l[i+3][j] - if temp > maximum: - maximum = temp - - #diagonal 1 - for i in range(17): - for j in range(17): - temp = l[i][j] * l[i+1][j+1] * l[i+2][j+2] * l[i+3][j+3] - if temp > maximum: - maximum = temp - - #diagonal 2 - for i in range(17): - for j in range(3, 20): - temp = l[i][j] * l[i+1][j-1] * l[i+2][j-2] * l[i+3][j-3] - if temp > maximum: - maximum = temp - print(maximum) - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/Project Euler/Problem 12/sol1.py b/Project Euler/Problem 12/sol1.py deleted file mode 100644 index 9c4483fd6..000000000 --- a/Project Euler/Problem 12/sol1.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import print_function -from math import sqrt -''' -Highly divisible triangular numbers -Problem 12 -The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be: - -1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... - -Let us list the factors of the first seven triangle numbers: - - 1: 1 - 3: 1,3 - 6: 1,2,3,6 -10: 1,2,5,10 -15: 1,3,5,15 -21: 1,3,7,21 -28: 1,2,4,7,14,28 -We can see that 28 is the first triangle number to have over five divisors. - -What is the value of the first triangle number to have over five hundred divisors? -''' -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def count_divisors(n): - nDivisors = 0 - for i in xrange(1, int(sqrt(n))+1): - if n%i == 0: - nDivisors += 2 - - return nDivisors - -tNum = 1 -i = 1 - -while True: - i += 1 - tNum += i - - if count_divisors(tNum) > 500: - break - -print(tNum) \ No newline at end of file diff --git a/Project Euler/Problem 13/sol1.py b/Project Euler/Problem 13/sol1.py deleted file mode 100644 index f041f0165..000000000 --- a/Project Euler/Problem 13/sol1.py +++ /dev/null @@ -1,14 +0,0 @@ -''' -Problem Statement: -Work out the first ten digits of the sum of the N 50-digit numbers. -''' -from __future__ import print_function - -n = int(raw_input().strip()) - -array = [] -for i in range(n): - array.append(int(raw_input().strip())) - -print(str(sum(array))[:10]) - diff --git a/Project Euler/Problem 14/sol1.py b/Project Euler/Problem 14/sol1.py deleted file mode 100644 index 9037f6eb8..000000000 --- a/Project Euler/Problem 14/sol1.py +++ /dev/null @@ -1,21 +0,0 @@ -from __future__ import print_function -largest_number = 0 -pre_counter = 0 - -for input1 in range(750000,1000000): - counter = 1 - number = input1 - - while number > 1: - if number % 2 == 0: - number /=2 - counter += 1 - else: - number = (3*number)+1 - counter += 1 - - if counter > pre_counter: - largest_number = input1 - pre_counter = counter - -print(('Largest Number:',largest_number,'->',pre_counter,'digits')) diff --git a/Project Euler/Problem 15/sol1.py b/Project Euler/Problem 15/sol1.py deleted file mode 100644 index d24748011..000000000 --- a/Project Euler/Problem 15/sol1.py +++ /dev/null @@ -1,20 +0,0 @@ -from __future__ import print_function -from math import factorial - -def lattice_paths(n): - n = 2*n #middle entry of odd rows starting at row 3 is the solution for n = 1, 2, 3,... - k = n/2 - - return factorial(n)/(factorial(k)*factorial(n-k)) - -if __name__ == '__main__': - import sys - - if len(sys.argv) == 1: - print(lattice_paths(20)) - else: - try: - n = int(sys.argv[1]) - print(lattice_paths(n)) - except ValueError: - print('Invalid entry - please enter a number.') diff --git a/Project Euler/Problem 16/sol1.py b/Project Euler/Problem 16/sol1.py deleted file mode 100644 index dfd7c9ae3..000000000 --- a/Project Euler/Problem 16/sol1.py +++ /dev/null @@ -1,15 +0,0 @@ -power = int(raw_input("Enter the power of 2: ")) -num = 2**power - -string_num = str(num) - -list_num = list(string_num) - -sum_of_num = 0 - -print("2 ^",power,"=",num) - -for i in list_num: - sum_of_num += int(i) - -print("Sum of the digits are:",sum_of_num) diff --git a/Project Euler/Problem 17/sol1.py b/Project Euler/Problem 17/sol1.py deleted file mode 100644 index 9de5d80b9..000000000 --- a/Project Euler/Problem 17/sol1.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import print_function -''' -Number letter counts -Problem 17 - -If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. - -If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? - - -NOTE: Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) -contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage. -''' - -ones_counts = [0, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8] #number of letters in zero, one, two, ..., nineteen (0 for zero since it's never said aloud) -tens_counts = [0, 0, 6, 6, 5, 5, 5, 7, 6, 6] #number of letters in twenty, thirty, ..., ninety (0 for numbers less than 20 due to inconsistency in teens) - -count = 0 - -for i in range(1, 1001): - if i < 1000: - if i >= 100: - count += ones_counts[i/100] + 7 #add number of letters for "n hundred" - - if i%100 is not 0: - count += 3 #add number of letters for "and" if number is not multiple of 100 - - if 0 < i%100 < 20: - count += ones_counts[i%100] #add number of letters for one, two, three, ..., nineteen (could be combined with below if not for inconsistency in teens) - else: - count += ones_counts[i%10] + tens_counts[(i%100-i%10)/10] #add number of letters for twenty, twenty one, ..., ninety nine - else: - count += ones_counts[i/1000] + 8 - -print(count) \ No newline at end of file diff --git a/Project Euler/Problem 19/sol1.py b/Project Euler/Problem 19/sol1.py deleted file mode 100644 index 94cf11702..000000000 --- a/Project Euler/Problem 19/sol1.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import print_function -''' -Counting Sundays -Problem 19 - -You are given the following information, but you may prefer to do some research for yourself. - -1 Jan 1900 was a Monday. -Thirty days has September, -April, June and November. -All the rest have thirty-one, -Saving February alone, -Which has twenty-eight, rain or shine. -And on leap years, twenty-nine. - -A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400. - -How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)? -''' - -days_per_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] - -day = 6 -month = 1 -year = 1901 - -sundays = 0 - -while year < 2001: - day += 7 - - if (year%4 == 0 and not year%100 == 0) or (year%400 == 0): - if day > days_per_month[month-1] and month is not 2: - month += 1 - day = day-days_per_month[month-2] - elif day > 29 and month is 2: - month += 1 - day = day-29 - else: - if day > days_per_month[month-1]: - month += 1 - day = day-days_per_month[month-2] - - if month > 12: - year += 1 - month = 1 - - if year < 2001 and day is 1: - sundays += 1 - -print(sundays) \ No newline at end of file diff --git a/Project Euler/Problem 20/sol1.py b/Project Euler/Problem 20/sol1.py deleted file mode 100644 index b347eb1f0..000000000 --- a/Project Euler/Problem 20/sol1.py +++ /dev/null @@ -1,27 +0,0 @@ -# Finding the factorial. -def factorial(n): - fact = 1 - for i in range(1,n+1): - fact *= i - return fact - -# Spliting the digits and adding it. -def split_and_add(number): - sum_of_digits = 0 - while(number>0): - last_digit = number % 10 - sum_of_digits += last_digit - number = int(number/10) # Removing the last_digit from the given number. - return sum_of_digits - -# Taking the user input. -number = int(raw_input("Enter the Number: ")) - -# Assigning the factorial from the factorial function. -factorial = factorial(number) - -# Spliting and adding the factorial into answer. -answer = split_and_add(factorial) - -# Printing the answer. -print(answer) diff --git a/Project Euler/Problem 20/sol2.py b/Project Euler/Problem 20/sol2.py deleted file mode 100644 index bca9af9cb..000000000 --- a/Project Euler/Problem 20/sol2.py +++ /dev/null @@ -1,5 +0,0 @@ -from math import factorial -def main(): - print(sum([int(x) for x in str(factorial(100))])) -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/Project Euler/Problem 21/sol1.py b/Project Euler/Problem 21/sol1.py deleted file mode 100644 index 6d137a7d4..000000000 --- a/Project Euler/Problem 21/sol1.py +++ /dev/null @@ -1,42 +0,0 @@ -#-.- coding: latin-1 -.- -from __future__ import print_function -from math import sqrt -''' -Amicable Numbers -Problem 21 - -Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). -If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b are called amicable numbers. - -For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220. - -Evaluate the sum of all the amicable numbers under 10000. -''' -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def sum_of_divisors(n): - total = 0 - for i in xrange(1, int(sqrt(n)+1)): - if n%i == 0 and i != sqrt(n): - total += i + n//i - elif i == sqrt(n): - total += i - - return total-n - -sums = [] -total = 0 - -for i in xrange(1, 10000): - n = sum_of_divisors(i) - - if n < len(sums): - if sums[n-1] == i: - total += n + i - - sums.append(n) - -print(total) \ No newline at end of file diff --git a/Project Euler/Problem 22/p022_names.txt b/Project Euler/Problem 22/p022_names.txt deleted file mode 100644 index 7b8986bf6..000000000 --- a/Project Euler/Problem 22/p022_names.txt +++ /dev/null @@ -1 +0,0 @@ -"MARY","PATRICIA","LINDA","BARBARA","ELIZABETH","JENNIFER","MARIA","SUSAN","MARGARET","DOROTHY","LISA","NANCY","KAREN","BETTY","HELEN","SANDRA","DONNA","CAROL","RUTH","SHARON","MICHELLE","LAURA","SARAH","KIMBERLY","DEBORAH","JESSICA","SHIRLEY","CYNTHIA","ANGELA","MELISSA","BRENDA","AMY","ANNA","REBECCA","VIRGINIA","KATHLEEN","PAMELA","MARTHA","DEBRA","AMANDA","STEPHANIE","CAROLYN","CHRISTINE","MARIE","JANET","CATHERINE","FRANCES","ANN","JOYCE","DIANE","ALICE","JULIE","HEATHER","TERESA","DORIS","GLORIA","EVELYN","JEAN","CHERYL","MILDRED","KATHERINE","JOAN","ASHLEY","JUDITH","ROSE","JANICE","KELLY","NICOLE","JUDY","CHRISTINA","KATHY","THERESA","BEVERLY","DENISE","TAMMY","IRENE","JANE","LORI","RACHEL","MARILYN","ANDREA","KATHRYN","LOUISE","SARA","ANNE","JACQUELINE","WANDA","BONNIE","JULIA","RUBY","LOIS","TINA","PHYLLIS","NORMA","PAULA","DIANA","ANNIE","LILLIAN","EMILY","ROBIN","PEGGY","CRYSTAL","GLADYS","RITA","DAWN","CONNIE","FLORENCE","TRACY","EDNA","TIFFANY","CARMEN","ROSA","CINDY","GRACE","WENDY","VICTORIA","EDITH","KIM","SHERRY","SYLVIA","JOSEPHINE","THELMA","SHANNON","SHEILA","ETHEL","ELLEN","ELAINE","MARJORIE","CARRIE","CHARLOTTE","MONICA","ESTHER","PAULINE","EMMA","JUANITA","ANITA","RHONDA","HAZEL","AMBER","EVA","DEBBIE","APRIL","LESLIE","CLARA","LUCILLE","JAMIE","JOANNE","ELEANOR","VALERIE","DANIELLE","MEGAN","ALICIA","SUZANNE","MICHELE","GAIL","BERTHA","DARLENE","VERONICA","JILL","ERIN","GERALDINE","LAUREN","CATHY","JOANN","LORRAINE","LYNN","SALLY","REGINA","ERICA","BEATRICE","DOLORES","BERNICE","AUDREY","YVONNE","ANNETTE","JUNE","SAMANTHA","MARION","DANA","STACY","ANA","RENEE","IDA","VIVIAN","ROBERTA","HOLLY","BRITTANY","MELANIE","LORETTA","YOLANDA","JEANETTE","LAURIE","KATIE","KRISTEN","VANESSA","ALMA","SUE","ELSIE","BETH","JEANNE","VICKI","CARLA","TARA","ROSEMARY","EILEEN","TERRI","GERTRUDE","LUCY","TONYA","ELLA","STACEY","WILMA","GINA","KRISTIN","JESSIE","NATALIE","AGNES","VERA","WILLIE","CHARLENE","BESSIE","DELORES","MELINDA","PEARL","ARLENE","MAUREEN","COLLEEN","ALLISON","TAMARA","JOY","GEORGIA","CONSTANCE","LILLIE","CLAUDIA","JACKIE","MARCIA","TANYA","NELLIE","MINNIE","MARLENE","HEIDI","GLENDA","LYDIA","VIOLA","COURTNEY","MARIAN","STELLA","CAROLINE","DORA","JO","VICKIE","MATTIE","TERRY","MAXINE","IRMA","MABEL","MARSHA","MYRTLE","LENA","CHRISTY","DEANNA","PATSY","HILDA","GWENDOLYN","JENNIE","NORA","MARGIE","NINA","CASSANDRA","LEAH","PENNY","KAY","PRISCILLA","NAOMI","CAROLE","BRANDY","OLGA","BILLIE","DIANNE","TRACEY","LEONA","JENNY","FELICIA","SONIA","MIRIAM","VELMA","BECKY","BOBBIE","VIOLET","KRISTINA","TONI","MISTY","MAE","SHELLY","DAISY","RAMONA","SHERRI","ERIKA","KATRINA","CLAIRE","LINDSEY","LINDSAY","GENEVA","GUADALUPE","BELINDA","MARGARITA","SHERYL","CORA","FAYE","ADA","NATASHA","SABRINA","ISABEL","MARGUERITE","HATTIE","HARRIET","MOLLY","CECILIA","KRISTI","BRANDI","BLANCHE","SANDY","ROSIE","JOANNA","IRIS","EUNICE","ANGIE","INEZ","LYNDA","MADELINE","AMELIA","ALBERTA","GENEVIEVE","MONIQUE","JODI","JANIE","MAGGIE","KAYLA","SONYA","JAN","LEE","KRISTINE","CANDACE","FANNIE","MARYANN","OPAL","ALISON","YVETTE","MELODY","LUZ","SUSIE","OLIVIA","FLORA","SHELLEY","KRISTY","MAMIE","LULA","LOLA","VERNA","BEULAH","ANTOINETTE","CANDICE","JUANA","JEANNETTE","PAM","KELLI","HANNAH","WHITNEY","BRIDGET","KARLA","CELIA","LATOYA","PATTY","SHELIA","GAYLE","DELLA","VICKY","LYNNE","SHERI","MARIANNE","KARA","JACQUELYN","ERMA","BLANCA","MYRA","LETICIA","PAT","KRISTA","ROXANNE","ANGELICA","JOHNNIE","ROBYN","FRANCIS","ADRIENNE","ROSALIE","ALEXANDRA","BROOKE","BETHANY","SADIE","BERNADETTE","TRACI","JODY","KENDRA","JASMINE","NICHOLE","RACHAEL","CHELSEA","MABLE","ERNESTINE","MURIEL","MARCELLA","ELENA","KRYSTAL","ANGELINA","NADINE","KARI","ESTELLE","DIANNA","PAULETTE","LORA","MONA","DOREEN","ROSEMARIE","ANGEL","DESIREE","ANTONIA","HOPE","GINGER","JANIS","BETSY","CHRISTIE","FREDA","MERCEDES","MEREDITH","LYNETTE","TERI","CRISTINA","EULA","LEIGH","MEGHAN","SOPHIA","ELOISE","ROCHELLE","GRETCHEN","CECELIA","RAQUEL","HENRIETTA","ALYSSA","JANA","KELLEY","GWEN","KERRY","JENNA","TRICIA","LAVERNE","OLIVE","ALEXIS","TASHA","SILVIA","ELVIRA","CASEY","DELIA","SOPHIE","KATE","PATTI","LORENA","KELLIE","SONJA","LILA","LANA","DARLA","MAY","MINDY","ESSIE","MANDY","LORENE","ELSA","JOSEFINA","JEANNIE","MIRANDA","DIXIE","LUCIA","MARTA","FAITH","LELA","JOHANNA","SHARI","CAMILLE","TAMI","SHAWNA","ELISA","EBONY","MELBA","ORA","NETTIE","TABITHA","OLLIE","JAIME","WINIFRED","KRISTIE","MARINA","ALISHA","AIMEE","RENA","MYRNA","MARLA","TAMMIE","LATASHA","BONITA","PATRICE","RONDA","SHERRIE","ADDIE","FRANCINE","DELORIS","STACIE","ADRIANA","CHERI","SHELBY","ABIGAIL","CELESTE","JEWEL","CARA","ADELE","REBEKAH","LUCINDA","DORTHY","CHRIS","EFFIE","TRINA","REBA","SHAWN","SALLIE","AURORA","LENORA","ETTA","LOTTIE","KERRI","TRISHA","NIKKI","ESTELLA","FRANCISCA","JOSIE","TRACIE","MARISSA","KARIN","BRITTNEY","JANELLE","LOURDES","LAUREL","HELENE","FERN","ELVA","CORINNE","KELSEY","INA","BETTIE","ELISABETH","AIDA","CAITLIN","INGRID","IVA","EUGENIA","CHRISTA","GOLDIE","CASSIE","MAUDE","JENIFER","THERESE","FRANKIE","DENA","LORNA","JANETTE","LATONYA","CANDY","MORGAN","CONSUELO","TAMIKA","ROSETTA","DEBORA","CHERIE","POLLY","DINA","JEWELL","FAY","JILLIAN","DOROTHEA","NELL","TRUDY","ESPERANZA","PATRICA","KIMBERLEY","SHANNA","HELENA","CAROLINA","CLEO","STEFANIE","ROSARIO","OLA","JANINE","MOLLIE","LUPE","ALISA","LOU","MARIBEL","SUSANNE","BETTE","SUSANA","ELISE","CECILE","ISABELLE","LESLEY","JOCELYN","PAIGE","JONI","RACHELLE","LEOLA","DAPHNE","ALTA","ESTER","PETRA","GRACIELA","IMOGENE","JOLENE","KEISHA","LACEY","GLENNA","GABRIELA","KERI","URSULA","LIZZIE","KIRSTEN","SHANA","ADELINE","MAYRA","JAYNE","JACLYN","GRACIE","SONDRA","CARMELA","MARISA","ROSALIND","CHARITY","TONIA","BEATRIZ","MARISOL","CLARICE","JEANINE","SHEENA","ANGELINE","FRIEDA","LILY","ROBBIE","SHAUNA","MILLIE","CLAUDETTE","CATHLEEN","ANGELIA","GABRIELLE","AUTUMN","KATHARINE","SUMMER","JODIE","STACI","LEA","CHRISTI","JIMMIE","JUSTINE","ELMA","LUELLA","MARGRET","DOMINIQUE","SOCORRO","RENE","MARTINA","MARGO","MAVIS","CALLIE","BOBBI","MARITZA","LUCILE","LEANNE","JEANNINE","DEANA","AILEEN","LORIE","LADONNA","WILLA","MANUELA","GALE","SELMA","DOLLY","SYBIL","ABBY","LARA","DALE","IVY","DEE","WINNIE","MARCY","LUISA","JERI","MAGDALENA","OFELIA","MEAGAN","AUDRA","MATILDA","LEILA","CORNELIA","BIANCA","SIMONE","BETTYE","RANDI","VIRGIE","LATISHA","BARBRA","GEORGINA","ELIZA","LEANN","BRIDGETTE","RHODA","HALEY","ADELA","NOLA","BERNADINE","FLOSSIE","ILA","GRETA","RUTHIE","NELDA","MINERVA","LILLY","TERRIE","LETHA","HILARY","ESTELA","VALARIE","BRIANNA","ROSALYN","EARLINE","CATALINA","AVA","MIA","CLARISSA","LIDIA","CORRINE","ALEXANDRIA","CONCEPCION","TIA","SHARRON","RAE","DONA","ERICKA","JAMI","ELNORA","CHANDRA","LENORE","NEVA","MARYLOU","MELISA","TABATHA","SERENA","AVIS","ALLIE","SOFIA","JEANIE","ODESSA","NANNIE","HARRIETT","LORAINE","PENELOPE","MILAGROS","EMILIA","BENITA","ALLYSON","ASHLEE","TANIA","TOMMIE","ESMERALDA","KARINA","EVE","PEARLIE","ZELMA","MALINDA","NOREEN","TAMEKA","SAUNDRA","HILLARY","AMIE","ALTHEA","ROSALINDA","JORDAN","LILIA","ALANA","GAY","CLARE","ALEJANDRA","ELINOR","MICHAEL","LORRIE","JERRI","DARCY","EARNESTINE","CARMELLA","TAYLOR","NOEMI","MARCIE","LIZA","ANNABELLE","LOUISA","EARLENE","MALLORY","CARLENE","NITA","SELENA","TANISHA","KATY","JULIANNE","JOHN","LAKISHA","EDWINA","MARICELA","MARGERY","KENYA","DOLLIE","ROXIE","ROSLYN","KATHRINE","NANETTE","CHARMAINE","LAVONNE","ILENE","KRIS","TAMMI","SUZETTE","CORINE","KAYE","JERRY","MERLE","CHRYSTAL","LINA","DEANNE","LILIAN","JULIANA","ALINE","LUANN","KASEY","MARYANNE","EVANGELINE","COLETTE","MELVA","LAWANDA","YESENIA","NADIA","MADGE","KATHIE","EDDIE","OPHELIA","VALERIA","NONA","MITZI","MARI","GEORGETTE","CLAUDINE","FRAN","ALISSA","ROSEANN","LAKEISHA","SUSANNA","REVA","DEIDRE","CHASITY","SHEREE","CARLY","JAMES","ELVIA","ALYCE","DEIRDRE","GENA","BRIANA","ARACELI","KATELYN","ROSANNE","WENDI","TESSA","BERTA","MARVA","IMELDA","MARIETTA","MARCI","LEONOR","ARLINE","SASHA","MADELYN","JANNA","JULIETTE","DEENA","AURELIA","JOSEFA","AUGUSTA","LILIANA","YOUNG","CHRISTIAN","LESSIE","AMALIA","SAVANNAH","ANASTASIA","VILMA","NATALIA","ROSELLA","LYNNETTE","CORINA","ALFREDA","LEANNA","CAREY","AMPARO","COLEEN","TAMRA","AISHA","WILDA","KARYN","CHERRY","QUEEN","MAURA","MAI","EVANGELINA","ROSANNA","HALLIE","ERNA","ENID","MARIANA","LACY","JULIET","JACKLYN","FREIDA","MADELEINE","MARA","HESTER","CATHRYN","LELIA","CASANDRA","BRIDGETT","ANGELITA","JANNIE","DIONNE","ANNMARIE","KATINA","BERYL","PHOEBE","MILLICENT","KATHERYN","DIANN","CARISSA","MARYELLEN","LIZ","LAURI","HELGA","GILDA","ADRIAN","RHEA","MARQUITA","HOLLIE","TISHA","TAMERA","ANGELIQUE","FRANCESCA","BRITNEY","KAITLIN","LOLITA","FLORINE","ROWENA","REYNA","TWILA","FANNY","JANELL","INES","CONCETTA","BERTIE","ALBA","BRIGITTE","ALYSON","VONDA","PANSY","ELBA","NOELLE","LETITIA","KITTY","DEANN","BRANDIE","LOUELLA","LETA","FELECIA","SHARLENE","LESA","BEVERLEY","ROBERT","ISABELLA","HERMINIA","TERRA","CELINA","TORI","OCTAVIA","JADE","DENICE","GERMAINE","SIERRA","MICHELL","CORTNEY","NELLY","DORETHA","SYDNEY","DEIDRA","MONIKA","LASHONDA","JUDI","CHELSEY","ANTIONETTE","MARGOT","BOBBY","ADELAIDE","NAN","LEEANN","ELISHA","DESSIE","LIBBY","KATHI","GAYLA","LATANYA","MINA","MELLISA","KIMBERLEE","JASMIN","RENAE","ZELDA","ELDA","MA","JUSTINA","GUSSIE","EMILIE","CAMILLA","ABBIE","ROCIO","KAITLYN","JESSE","EDYTHE","ASHLEIGH","SELINA","LAKESHA","GERI","ALLENE","PAMALA","MICHAELA","DAYNA","CARYN","ROSALIA","SUN","JACQULINE","REBECA","MARYBETH","KRYSTLE","IOLA","DOTTIE","BENNIE","BELLE","AUBREY","GRISELDA","ERNESTINA","ELIDA","ADRIANNE","DEMETRIA","DELMA","CHONG","JAQUELINE","DESTINY","ARLEEN","VIRGINA","RETHA","FATIMA","TILLIE","ELEANORE","CARI","TREVA","BIRDIE","WILHELMINA","ROSALEE","MAURINE","LATRICE","YONG","JENA","TARYN","ELIA","DEBBY","MAUDIE","JEANNA","DELILAH","CATRINA","SHONDA","HORTENCIA","THEODORA","TERESITA","ROBBIN","DANETTE","MARYJANE","FREDDIE","DELPHINE","BRIANNE","NILDA","DANNA","CINDI","BESS","IONA","HANNA","ARIEL","WINONA","VIDA","ROSITA","MARIANNA","WILLIAM","RACHEAL","GUILLERMINA","ELOISA","CELESTINE","CAREN","MALISSA","LONA","CHANTEL","SHELLIE","MARISELA","LEORA","AGATHA","SOLEDAD","MIGDALIA","IVETTE","CHRISTEN","ATHENA","JANEL","CHLOE","VEDA","PATTIE","TESSIE","TERA","MARILYNN","LUCRETIA","KARRIE","DINAH","DANIELA","ALECIA","ADELINA","VERNICE","SHIELA","PORTIA","MERRY","LASHAWN","DEVON","DARA","TAWANA","OMA","VERDA","CHRISTIN","ALENE","ZELLA","SANDI","RAFAELA","MAYA","KIRA","CANDIDA","ALVINA","SUZAN","SHAYLA","LYN","LETTIE","ALVA","SAMATHA","ORALIA","MATILDE","MADONNA","LARISSA","VESTA","RENITA","INDIA","DELOIS","SHANDA","PHILLIS","LORRI","ERLINDA","CRUZ","CATHRINE","BARB","ZOE","ISABELL","IONE","GISELA","CHARLIE","VALENCIA","ROXANNA","MAYME","KISHA","ELLIE","MELLISSA","DORRIS","DALIA","BELLA","ANNETTA","ZOILA","RETA","REINA","LAURETTA","KYLIE","CHRISTAL","PILAR","CHARLA","ELISSA","TIFFANI","TANA","PAULINA","LEOTA","BREANNA","JAYME","CARMEL","VERNELL","TOMASA","MANDI","DOMINGA","SANTA","MELODIE","LURA","ALEXA","TAMELA","RYAN","MIRNA","KERRIE","VENUS","NOEL","FELICITA","CRISTY","CARMELITA","BERNIECE","ANNEMARIE","TIARA","ROSEANNE","MISSY","CORI","ROXANA","PRICILLA","KRISTAL","JUNG","ELYSE","HAYDEE","ALETHA","BETTINA","MARGE","GILLIAN","FILOMENA","CHARLES","ZENAIDA","HARRIETTE","CARIDAD","VADA","UNA","ARETHA","PEARLINE","MARJORY","MARCELA","FLOR","EVETTE","ELOUISE","ALINA","TRINIDAD","DAVID","DAMARIS","CATHARINE","CARROLL","BELVA","NAKIA","MARLENA","LUANNE","LORINE","KARON","DORENE","DANITA","BRENNA","TATIANA","SAMMIE","LOUANN","LOREN","JULIANNA","ANDRIA","PHILOMENA","LUCILA","LEONORA","DOVIE","ROMONA","MIMI","JACQUELIN","GAYE","TONJA","MISTI","JOE","GENE","CHASTITY","STACIA","ROXANN","MICAELA","NIKITA","MEI","VELDA","MARLYS","JOHNNA","AURA","LAVERN","IVONNE","HAYLEY","NICKI","MAJORIE","HERLINDA","GEORGE","ALPHA","YADIRA","PERLA","GREGORIA","DANIEL","ANTONETTE","SHELLI","MOZELLE","MARIAH","JOELLE","CORDELIA","JOSETTE","CHIQUITA","TRISTA","LOUIS","LAQUITA","GEORGIANA","CANDI","SHANON","LONNIE","HILDEGARD","CECIL","VALENTINA","STEPHANY","MAGDA","KAROL","GERRY","GABRIELLA","TIANA","ROMA","RICHELLE","RAY","PRINCESS","OLETA","JACQUE","IDELLA","ALAINA","SUZANNA","JOVITA","BLAIR","TOSHA","RAVEN","NEREIDA","MARLYN","KYLA","JOSEPH","DELFINA","TENA","STEPHENIE","SABINA","NATHALIE","MARCELLE","GERTIE","DARLEEN","THEA","SHARONDA","SHANTEL","BELEN","VENESSA","ROSALINA","ONA","GENOVEVA","COREY","CLEMENTINE","ROSALBA","RENATE","RENATA","MI","IVORY","GEORGIANNA","FLOY","DORCAS","ARIANA","TYRA","THEDA","MARIAM","JULI","JESICA","DONNIE","VIKKI","VERLA","ROSELYN","MELVINA","JANNETTE","GINNY","DEBRAH","CORRIE","ASIA","VIOLETA","MYRTIS","LATRICIA","COLLETTE","CHARLEEN","ANISSA","VIVIANA","TWYLA","PRECIOUS","NEDRA","LATONIA","LAN","HELLEN","FABIOLA","ANNAMARIE","ADELL","SHARYN","CHANTAL","NIKI","MAUD","LIZETTE","LINDY","KIA","KESHA","JEANA","DANELLE","CHARLINE","CHANEL","CARROL","VALORIE","LIA","DORTHA","CRISTAL","SUNNY","LEONE","LEILANI","GERRI","DEBI","ANDRA","KESHIA","IMA","EULALIA","EASTER","DULCE","NATIVIDAD","LINNIE","KAMI","GEORGIE","CATINA","BROOK","ALDA","WINNIFRED","SHARLA","RUTHANN","MEAGHAN","MAGDALENE","LISSETTE","ADELAIDA","VENITA","TRENA","SHIRLENE","SHAMEKA","ELIZEBETH","DIAN","SHANTA","MICKEY","LATOSHA","CARLOTTA","WINDY","SOON","ROSINA","MARIANN","LEISA","JONNIE","DAWNA","CATHIE","BILLY","ASTRID","SIDNEY","LAUREEN","JANEEN","HOLLI","FAWN","VICKEY","TERESSA","SHANTE","RUBYE","MARCELINA","CHANDA","CARY","TERESE","SCARLETT","MARTY","MARNIE","LULU","LISETTE","JENIFFER","ELENOR","DORINDA","DONITA","CARMAN","BERNITA","ALTAGRACIA","ALETA","ADRIANNA","ZORAIDA","RONNIE","NICOLA","LYNDSEY","KENDALL","JANINA","CHRISSY","AMI","STARLA","PHYLIS","PHUONG","KYRA","CHARISSE","BLANCH","SANJUANITA","RONA","NANCI","MARILEE","MARANDA","CORY","BRIGETTE","SANJUANA","MARITA","KASSANDRA","JOYCELYN","IRA","FELIPA","CHELSIE","BONNY","MIREYA","LORENZA","KYONG","ILEANA","CANDELARIA","TONY","TOBY","SHERIE","OK","MARK","LUCIE","LEATRICE","LAKESHIA","GERDA","EDIE","BAMBI","MARYLIN","LAVON","HORTENSE","GARNET","EVIE","TRESSA","SHAYNA","LAVINA","KYUNG","JEANETTA","SHERRILL","SHARA","PHYLISS","MITTIE","ANABEL","ALESIA","THUY","TAWANDA","RICHARD","JOANIE","TIFFANIE","LASHANDA","KARISSA","ENRIQUETA","DARIA","DANIELLA","CORINNA","ALANNA","ABBEY","ROXANE","ROSEANNA","MAGNOLIA","LIDA","KYLE","JOELLEN","ERA","CORAL","CARLEEN","TRESA","PEGGIE","NOVELLA","NILA","MAYBELLE","JENELLE","CARINA","NOVA","MELINA","MARQUERITE","MARGARETTE","JOSEPHINA","EVONNE","DEVIN","CINTHIA","ALBINA","TOYA","TAWNYA","SHERITA","SANTOS","MYRIAM","LIZABETH","LISE","KEELY","JENNI","GISELLE","CHERYLE","ARDITH","ARDIS","ALESHA","ADRIANE","SHAINA","LINNEA","KAROLYN","HONG","FLORIDA","FELISHA","DORI","DARCI","ARTIE","ARMIDA","ZOLA","XIOMARA","VERGIE","SHAMIKA","NENA","NANNETTE","MAXIE","LOVIE","JEANE","JAIMIE","INGE","FARRAH","ELAINA","CAITLYN","STARR","FELICITAS","CHERLY","CARYL","YOLONDA","YASMIN","TEENA","PRUDENCE","PENNIE","NYDIA","MACKENZIE","ORPHA","MARVEL","LIZBETH","LAURETTE","JERRIE","HERMELINDA","CAROLEE","TIERRA","MIRIAN","META","MELONY","KORI","JENNETTE","JAMILA","ENA","ANH","YOSHIKO","SUSANNAH","SALINA","RHIANNON","JOLEEN","CRISTINE","ASHTON","ARACELY","TOMEKA","SHALONDA","MARTI","LACIE","KALA","JADA","ILSE","HAILEY","BRITTANI","ZONA","SYBLE","SHERRYL","RANDY","NIDIA","MARLO","KANDICE","KANDI","DEB","DEAN","AMERICA","ALYCIA","TOMMY","RONNA","NORENE","MERCY","JOSE","INGEBORG","GIOVANNA","GEMMA","CHRISTEL","AUDRY","ZORA","VITA","VAN","TRISH","STEPHAINE","SHIRLEE","SHANIKA","MELONIE","MAZIE","JAZMIN","INGA","HOA","HETTIE","GERALYN","FONDA","ESTRELLA","ADELLA","SU","SARITA","RINA","MILISSA","MARIBETH","GOLDA","EVON","ETHELYN","ENEDINA","CHERISE","CHANA","VELVA","TAWANNA","SADE","MIRTA","LI","KARIE","JACINTA","ELNA","DAVINA","CIERRA","ASHLIE","ALBERTHA","TANESHA","STEPHANI","NELLE","MINDI","LU","LORINDA","LARUE","FLORENE","DEMETRA","DEDRA","CIARA","CHANTELLE","ASHLY","SUZY","ROSALVA","NOELIA","LYDA","LEATHA","KRYSTYNA","KRISTAN","KARRI","DARLINE","DARCIE","CINDA","CHEYENNE","CHERRIE","AWILDA","ALMEDA","ROLANDA","LANETTE","JERILYN","GISELE","EVALYN","CYNDI","CLETA","CARIN","ZINA","ZENA","VELIA","TANIKA","PAUL","CHARISSA","THOMAS","TALIA","MARGARETE","LAVONDA","KAYLEE","KATHLENE","JONNA","IRENA","ILONA","IDALIA","CANDIS","CANDANCE","BRANDEE","ANITRA","ALIDA","SIGRID","NICOLETTE","MARYJO","LINETTE","HEDWIG","CHRISTIANA","CASSIDY","ALEXIA","TRESSIE","MODESTA","LUPITA","LITA","GLADIS","EVELIA","DAVIDA","CHERRI","CECILY","ASHELY","ANNABEL","AGUSTINA","WANITA","SHIRLY","ROSAURA","HULDA","EUN","BAILEY","YETTA","VERONA","THOMASINA","SIBYL","SHANNAN","MECHELLE","LUE","LEANDRA","LANI","KYLEE","KANDY","JOLYNN","FERNE","EBONI","CORENE","ALYSIA","ZULA","NADA","MOIRA","LYNDSAY","LORRETTA","JUAN","JAMMIE","HORTENSIA","GAYNELL","CAMERON","ADRIA","VINA","VICENTA","TANGELA","STEPHINE","NORINE","NELLA","LIANA","LESLEE","KIMBERELY","ILIANA","GLORY","FELICA","EMOGENE","ELFRIEDE","EDEN","EARTHA","CARMA","BEA","OCIE","MARRY","LENNIE","KIARA","JACALYN","CARLOTA","ARIELLE","YU","STAR","OTILIA","KIRSTIN","KACEY","JOHNETTA","JOEY","JOETTA","JERALDINE","JAUNITA","ELANA","DORTHEA","CAMI","AMADA","ADELIA","VERNITA","TAMAR","SIOBHAN","RENEA","RASHIDA","OUIDA","ODELL","NILSA","MERYL","KRISTYN","JULIETA","DANICA","BREANNE","AUREA","ANGLEA","SHERRON","ODETTE","MALIA","LORELEI","LIN","LEESA","KENNA","KATHLYN","FIONA","CHARLETTE","SUZIE","SHANTELL","SABRA","RACQUEL","MYONG","MIRA","MARTINE","LUCIENNE","LAVADA","JULIANN","JOHNIE","ELVERA","DELPHIA","CLAIR","CHRISTIANE","CHAROLETTE","CARRI","AUGUSTINE","ASHA","ANGELLA","PAOLA","NINFA","LEDA","LAI","EDA","SUNSHINE","STEFANI","SHANELL","PALMA","MACHELLE","LISSA","KECIA","KATHRYNE","KARLENE","JULISSA","JETTIE","JENNIFFER","HUI","CORRINA","CHRISTOPHER","CAROLANN","ALENA","TESS","ROSARIA","MYRTICE","MARYLEE","LIANE","KENYATTA","JUDIE","JANEY","IN","ELMIRA","ELDORA","DENNA","CRISTI","CATHI","ZAIDA","VONNIE","VIVA","VERNIE","ROSALINE","MARIELA","LUCIANA","LESLI","KARAN","FELICE","DENEEN","ADINA","WYNONA","TARSHA","SHERON","SHASTA","SHANITA","SHANI","SHANDRA","RANDA","PINKIE","PARIS","NELIDA","MARILOU","LYLA","LAURENE","LACI","JOI","JANENE","DOROTHA","DANIELE","DANI","CAROLYNN","CARLYN","BERENICE","AYESHA","ANNELIESE","ALETHEA","THERSA","TAMIKO","RUFINA","OLIVA","MOZELL","MARYLYN","MADISON","KRISTIAN","KATHYRN","KASANDRA","KANDACE","JANAE","GABRIEL","DOMENICA","DEBBRA","DANNIELLE","CHUN","BUFFY","BARBIE","ARCELIA","AJA","ZENOBIA","SHAREN","SHAREE","PATRICK","PAGE","MY","LAVINIA","KUM","KACIE","JACKELINE","HUONG","FELISA","EMELIA","ELEANORA","CYTHIA","CRISTIN","CLYDE","CLARIBEL","CARON","ANASTACIA","ZULMA","ZANDRA","YOKO","TENISHA","SUSANN","SHERILYN","SHAY","SHAWANDA","SABINE","ROMANA","MATHILDA","LINSEY","KEIKO","JOANA","ISELA","GRETTA","GEORGETTA","EUGENIE","DUSTY","DESIRAE","DELORA","CORAZON","ANTONINA","ANIKA","WILLENE","TRACEE","TAMATHA","REGAN","NICHELLE","MICKIE","MAEGAN","LUANA","LANITA","KELSIE","EDELMIRA","BREE","AFTON","TEODORA","TAMIE","SHENA","MEG","LINH","KELI","KACI","DANYELLE","BRITT","ARLETTE","ALBERTINE","ADELLE","TIFFINY","STORMY","SIMONA","NUMBERS","NICOLASA","NICHOL","NIA","NAKISHA","MEE","MAIRA","LOREEN","KIZZY","JOHNNY","JAY","FALLON","CHRISTENE","BOBBYE","ANTHONY","YING","VINCENZA","TANJA","RUBIE","RONI","QUEENIE","MARGARETT","KIMBERLI","IRMGARD","IDELL","HILMA","EVELINA","ESTA","EMILEE","DENNISE","DANIA","CARL","CARIE","ANTONIO","WAI","SANG","RISA","RIKKI","PARTICIA","MUI","MASAKO","MARIO","LUVENIA","LOREE","LONI","LIEN","KEVIN","GIGI","FLORENCIA","DORIAN","DENITA","DALLAS","CHI","BILLYE","ALEXANDER","TOMIKA","SHARITA","RANA","NIKOLE","NEOMA","MARGARITE","MADALYN","LUCINA","LAILA","KALI","JENETTE","GABRIELE","EVELYNE","ELENORA","CLEMENTINA","ALEJANDRINA","ZULEMA","VIOLETTE","VANNESSA","THRESA","RETTA","PIA","PATIENCE","NOELLA","NICKIE","JONELL","DELTA","CHUNG","CHAYA","CAMELIA","BETHEL","ANYA","ANDREW","THANH","SUZANN","SPRING","SHU","MILA","LILLA","LAVERNA","KEESHA","KATTIE","GIA","GEORGENE","EVELINE","ESTELL","ELIZBETH","VIVIENNE","VALLIE","TRUDIE","STEPHANE","MICHEL","MAGALY","MADIE","KENYETTA","KARREN","JANETTA","HERMINE","HARMONY","DRUCILLA","DEBBI","CELESTINA","CANDIE","BRITNI","BECKIE","AMINA","ZITA","YUN","YOLANDE","VIVIEN","VERNETTA","TRUDI","SOMMER","PEARLE","PATRINA","OSSIE","NICOLLE","LOYCE","LETTY","LARISA","KATHARINA","JOSELYN","JONELLE","JENELL","IESHA","HEIDE","FLORINDA","FLORENTINA","FLO","ELODIA","DORINE","BRUNILDA","BRIGID","ASHLI","ARDELLA","TWANA","THU","TARAH","SUNG","SHEA","SHAVON","SHANE","SERINA","RAYNA","RAMONITA","NGA","MARGURITE","LUCRECIA","KOURTNEY","KATI","JESUS","JESENIA","DIAMOND","CRISTA","AYANA","ALICA","ALIA","VINNIE","SUELLEN","ROMELIA","RACHELL","PIPER","OLYMPIA","MICHIKO","KATHALEEN","JOLIE","JESSI","JANESSA","HANA","HA","ELEASE","CARLETTA","BRITANY","SHONA","SALOME","ROSAMOND","REGENA","RAINA","NGOC","NELIA","LOUVENIA","LESIA","LATRINA","LATICIA","LARHONDA","JINA","JACKI","HOLLIS","HOLLEY","EMMY","DEEANN","CORETTA","ARNETTA","VELVET","THALIA","SHANICE","NETA","MIKKI","MICKI","LONNA","LEANA","LASHUNDA","KILEY","JOYE","JACQULYN","IGNACIA","HYUN","HIROKO","HENRY","HENRIETTE","ELAYNE","DELINDA","DARNELL","DAHLIA","COREEN","CONSUELA","CONCHITA","CELINE","BABETTE","AYANNA","ANETTE","ALBERTINA","SKYE","SHAWNEE","SHANEKA","QUIANA","PAMELIA","MIN","MERRI","MERLENE","MARGIT","KIESHA","KIERA","KAYLENE","JODEE","JENISE","ERLENE","EMMIE","ELSE","DARYL","DALILA","DAISEY","CODY","CASIE","BELIA","BABARA","VERSIE","VANESA","SHELBA","SHAWNDA","SAM","NORMAN","NIKIA","NAOMA","MARNA","MARGERET","MADALINE","LAWANA","KINDRA","JUTTA","JAZMINE","JANETT","HANNELORE","GLENDORA","GERTRUD","GARNETT","FREEDA","FREDERICA","FLORANCE","FLAVIA","DENNIS","CARLINE","BEVERLEE","ANJANETTE","VALDA","TRINITY","TAMALA","STEVIE","SHONNA","SHA","SARINA","ONEIDA","MICAH","MERILYN","MARLEEN","LURLINE","LENNA","KATHERIN","JIN","JENI","HAE","GRACIA","GLADY","FARAH","ERIC","ENOLA","EMA","DOMINQUE","DEVONA","DELANA","CECILA","CAPRICE","ALYSHA","ALI","ALETHIA","VENA","THERESIA","TAWNY","SONG","SHAKIRA","SAMARA","SACHIKO","RACHELE","PAMELLA","NICKY","MARNI","MARIEL","MAREN","MALISA","LIGIA","LERA","LATORIA","LARAE","KIMBER","KATHERN","KAREY","JENNEFER","JANETH","HALINA","FREDIA","DELISA","DEBROAH","CIERA","CHIN","ANGELIKA","ANDREE","ALTHA","YEN","VIVAN","TERRESA","TANNA","SUK","SUDIE","SOO","SIGNE","SALENA","RONNI","REBBECCA","MYRTIE","MCKENZIE","MALIKA","MAIDA","LOAN","LEONARDA","KAYLEIGH","FRANCE","ETHYL","ELLYN","DAYLE","CAMMIE","BRITTNI","BIRGIT","AVELINA","ASUNCION","ARIANNA","AKIKO","VENICE","TYESHA","TONIE","TIESHA","TAKISHA","STEFFANIE","SINDY","SANTANA","MEGHANN","MANDA","MACIE","LADY","KELLYE","KELLEE","JOSLYN","JASON","INGER","INDIRA","GLINDA","GLENNIS","FERNANDA","FAUSTINA","ENEIDA","ELICIA","DOT","DIGNA","DELL","ARLETTA","ANDRE","WILLIA","TAMMARA","TABETHA","SHERRELL","SARI","REFUGIO","REBBECA","PAULETTA","NIEVES","NATOSHA","NAKITA","MAMMIE","KENISHA","KAZUKO","KASSIE","GARY","EARLEAN","DAPHINE","CORLISS","CLOTILDE","CAROLYNE","BERNETTA","AUGUSTINA","AUDREA","ANNIS","ANNABELL","YAN","TENNILLE","TAMICA","SELENE","SEAN","ROSANA","REGENIA","QIANA","MARKITA","MACY","LEEANNE","LAURINE","KYM","JESSENIA","JANITA","GEORGINE","GENIE","EMIKO","ELVIE","DEANDRA","DAGMAR","CORIE","COLLEN","CHERISH","ROMAINE","PORSHA","PEARLENE","MICHELINE","MERNA","MARGORIE","MARGARETTA","LORE","KENNETH","JENINE","HERMINA","FREDERICKA","ELKE","DRUSILLA","DORATHY","DIONE","DESIRE","CELENA","BRIGIDA","ANGELES","ALLEGRA","THEO","TAMEKIA","SYNTHIA","STEPHEN","SOOK","SLYVIA","ROSANN","REATHA","RAYE","MARQUETTA","MARGART","LING","LAYLA","KYMBERLY","KIANA","KAYLEEN","KATLYN","KARMEN","JOELLA","IRINA","EMELDA","ELENI","DETRA","CLEMMIE","CHERYLL","CHANTELL","CATHEY","ARNITA","ARLA","ANGLE","ANGELIC","ALYSE","ZOFIA","THOMASINE","TENNIE","SON","SHERLY","SHERLEY","SHARYL","REMEDIOS","PETRINA","NICKOLE","MYUNG","MYRLE","MOZELLA","LOUANNE","LISHA","LATIA","LANE","KRYSTA","JULIENNE","JOEL","JEANENE","JACQUALINE","ISAURA","GWENDA","EARLEEN","DONALD","CLEOPATRA","CARLIE","AUDIE","ANTONIETTA","ALISE","ALEX","VERDELL","VAL","TYLER","TOMOKO","THAO","TALISHA","STEVEN","SO","SHEMIKA","SHAUN","SCARLET","SAVANNA","SANTINA","ROSIA","RAEANN","ODILIA","NANA","MINNA","MAGAN","LYNELLE","LE","KARMA","JOEANN","IVANA","INELL","ILANA","HYE","HONEY","HEE","GUDRUN","FRANK","DREAMA","CRISSY","CHANTE","CARMELINA","ARVILLA","ARTHUR","ANNAMAE","ALVERA","ALEIDA","AARON","YEE","YANIRA","VANDA","TIANNA","TAM","STEFANIA","SHIRA","PERRY","NICOL","NANCIE","MONSERRATE","MINH","MELYNDA","MELANY","MATTHEW","LOVELLA","LAURE","KIRBY","KACY","JACQUELYNN","HYON","GERTHA","FRANCISCO","ELIANA","CHRISTENA","CHRISTEEN","CHARISE","CATERINA","CARLEY","CANDYCE","ARLENA","AMMIE","YANG","WILLETTE","VANITA","TUYET","TINY","SYREETA","SILVA","SCOTT","RONALD","PENNEY","NYLA","MICHAL","MAURICE","MARYAM","MARYA","MAGEN","LUDIE","LOMA","LIVIA","LANELL","KIMBERLIE","JULEE","DONETTA","DIEDRA","DENISHA","DEANE","DAWNE","CLARINE","CHERRYL","BRONWYN","BRANDON","ALLA","VALERY","TONDA","SUEANN","SORAYA","SHOSHANA","SHELA","SHARLEEN","SHANELLE","NERISSA","MICHEAL","MERIDITH","MELLIE","MAYE","MAPLE","MAGARET","LUIS","LILI","LEONILA","LEONIE","LEEANNA","LAVONIA","LAVERA","KRISTEL","KATHEY","KATHE","JUSTIN","JULIAN","JIMMY","JANN","ILDA","HILDRED","HILDEGARDE","GENIA","FUMIKO","EVELIN","ERMELINDA","ELLY","DUNG","DOLORIS","DIONNA","DANAE","BERNEICE","ANNICE","ALIX","VERENA","VERDIE","TRISTAN","SHAWNNA","SHAWANA","SHAUNNA","ROZELLA","RANDEE","RANAE","MILAGRO","LYNELL","LUISE","LOUIE","LOIDA","LISBETH","KARLEEN","JUNITA","JONA","ISIS","HYACINTH","HEDY","GWENN","ETHELENE","ERLINE","EDWARD","DONYA","DOMONIQUE","DELICIA","DANNETTE","CICELY","BRANDA","BLYTHE","BETHANN","ASHLYN","ANNALEE","ALLINE","YUKO","VELLA","TRANG","TOWANDA","TESHA","SHERLYN","NARCISA","MIGUELINA","MERI","MAYBELL","MARLANA","MARGUERITA","MADLYN","LUNA","LORY","LORIANN","LIBERTY","LEONORE","LEIGHANN","LAURICE","LATESHA","LARONDA","KATRICE","KASIE","KARL","KALEY","JADWIGA","GLENNIE","GEARLDINE","FRANCINA","EPIFANIA","DYAN","DORIE","DIEDRE","DENESE","DEMETRICE","DELENA","DARBY","CRISTIE","CLEORA","CATARINA","CARISA","BERNIE","BARBERA","ALMETA","TRULA","TEREASA","SOLANGE","SHEILAH","SHAVONNE","SANORA","ROCHELL","MATHILDE","MARGARETA","MAIA","LYNSEY","LAWANNA","LAUNA","KENA","KEENA","KATIA","JAMEY","GLYNDA","GAYLENE","ELVINA","ELANOR","DANUTA","DANIKA","CRISTEN","CORDIE","COLETTA","CLARITA","CARMON","BRYNN","AZUCENA","AUNDREA","ANGELE","YI","WALTER","VERLIE","VERLENE","TAMESHA","SILVANA","SEBRINA","SAMIRA","REDA","RAYLENE","PENNI","PANDORA","NORAH","NOMA","MIREILLE","MELISSIA","MARYALICE","LARAINE","KIMBERY","KARYL","KARINE","KAM","JOLANDA","JOHANA","JESUSA","JALEESA","JAE","JACQUELYNE","IRISH","ILUMINADA","HILARIA","HANH","GENNIE","FRANCIE","FLORETTA","EXIE","EDDA","DREMA","DELPHA","BEV","BARBAR","ASSUNTA","ARDELL","ANNALISA","ALISIA","YUKIKO","YOLANDO","WONDA","WEI","WALTRAUD","VETA","TEQUILA","TEMEKA","TAMEIKA","SHIRLEEN","SHENITA","PIEDAD","OZELLA","MIRTHA","MARILU","KIMIKO","JULIANE","JENICE","JEN","JANAY","JACQUILINE","HILDE","FE","FAE","EVAN","EUGENE","ELOIS","ECHO","DEVORAH","CHAU","BRINDA","BETSEY","ARMINDA","ARACELIS","APRYL","ANNETT","ALISHIA","VEOLA","USHA","TOSHIKO","THEOLA","TASHIA","TALITHA","SHERY","RUDY","RENETTA","REIKO","RASHEEDA","OMEGA","OBDULIA","MIKA","MELAINE","MEGGAN","MARTIN","MARLEN","MARGET","MARCELINE","MANA","MAGDALEN","LIBRADA","LEZLIE","LEXIE","LATASHIA","LASANDRA","KELLE","ISIDRA","ISA","INOCENCIA","GWYN","FRANCOISE","ERMINIA","ERINN","DIMPLE","DEVORA","CRISELDA","ARMANDA","ARIE","ARIANE","ANGELO","ANGELENA","ALLEN","ALIZA","ADRIENE","ADALINE","XOCHITL","TWANNA","TRAN","TOMIKO","TAMISHA","TAISHA","SUSY","SIU","RUTHA","ROXY","RHONA","RAYMOND","OTHA","NORIKO","NATASHIA","MERRIE","MELVIN","MARINDA","MARIKO","MARGERT","LORIS","LIZZETTE","LEISHA","KAILA","KA","JOANNIE","JERRICA","JENE","JANNET","JANEE","JACINDA","HERTA","ELENORE","DORETTA","DELAINE","DANIELL","CLAUDIE","CHINA","BRITTA","APOLONIA","AMBERLY","ALEASE","YURI","YUK","WEN","WANETA","UTE","TOMI","SHARRI","SANDIE","ROSELLE","REYNALDA","RAGUEL","PHYLICIA","PATRIA","OLIMPIA","ODELIA","MITZIE","MITCHELL","MISS","MINDA","MIGNON","MICA","MENDY","MARIVEL","MAILE","LYNETTA","LAVETTE","LAURYN","LATRISHA","LAKIESHA","KIERSTEN","KARY","JOSPHINE","JOLYN","JETTA","JANISE","JACQUIE","IVELISSE","GLYNIS","GIANNA","GAYNELLE","EMERALD","DEMETRIUS","DANYELL","DANILLE","DACIA","CORALEE","CHER","CEOLA","BRETT","BELL","ARIANNE","ALESHIA","YUNG","WILLIEMAE","TROY","TRINH","THORA","TAI","SVETLANA","SHERIKA","SHEMEKA","SHAUNDA","ROSELINE","RICKI","MELDA","MALLIE","LAVONNA","LATINA","LARRY","LAQUANDA","LALA","LACHELLE","KLARA","KANDIS","JOHNA","JEANMARIE","JAYE","HANG","GRAYCE","GERTUDE","EMERITA","EBONIE","CLORINDA","CHING","CHERY","CAROLA","BREANN","BLOSSOM","BERNARDINE","BECKI","ARLETHA","ARGELIA","ARA","ALITA","YULANDA","YON","YESSENIA","TOBI","TASIA","SYLVIE","SHIRL","SHIRELY","SHERIDAN","SHELLA","SHANTELLE","SACHA","ROYCE","REBECKA","REAGAN","PROVIDENCIA","PAULENE","MISHA","MIKI","MARLINE","MARICA","LORITA","LATOYIA","LASONYA","KERSTIN","KENDA","KEITHA","KATHRIN","JAYMIE","JACK","GRICELDA","GINETTE","ERYN","ELINA","ELFRIEDA","DANYEL","CHEREE","CHANELLE","BARRIE","AVERY","AURORE","ANNAMARIA","ALLEEN","AILENE","AIDE","YASMINE","VASHTI","VALENTINE","TREASA","TORY","TIFFANEY","SHERYLL","SHARIE","SHANAE","SAU","RAISA","PA","NEDA","MITSUKO","MIRELLA","MILDA","MARYANNA","MARAGRET","MABELLE","LUETTA","LORINA","LETISHA","LATARSHA","LANELLE","LAJUANA","KRISSY","KARLY","KARENA","JON","JESSIKA","JERICA","JEANELLE","JANUARY","JALISA","JACELYN","IZOLA","IVEY","GREGORY","EUNA","ETHA","DREW","DOMITILA","DOMINICA","DAINA","CREOLA","CARLI","CAMIE","BUNNY","BRITTNY","ASHANTI","ANISHA","ALEEN","ADAH","YASUKO","WINTER","VIKI","VALRIE","TONA","TINISHA","THI","TERISA","TATUM","TANEKA","SIMONNE","SHALANDA","SERITA","RESSIE","REFUGIA","PAZ","OLENE","NA","MERRILL","MARGHERITA","MANDIE","MAN","MAIRE","LYNDIA","LUCI","LORRIANE","LORETA","LEONIA","LAVONA","LASHAWNDA","LAKIA","KYOKO","KRYSTINA","KRYSTEN","KENIA","KELSI","JUDE","JEANICE","ISOBEL","GEORGIANN","GENNY","FELICIDAD","EILENE","DEON","DELOISE","DEEDEE","DANNIE","CONCEPTION","CLORA","CHERILYN","CHANG","CALANDRA","BERRY","ARMANDINA","ANISA","ULA","TIMOTHY","TIERA","THERESSA","STEPHANIA","SIMA","SHYLA","SHONTA","SHERA","SHAQUITA","SHALA","SAMMY","ROSSANA","NOHEMI","NERY","MORIAH","MELITA","MELIDA","MELANI","MARYLYNN","MARISHA","MARIETTE","MALORIE","MADELENE","LUDIVINA","LORIA","LORETTE","LORALEE","LIANNE","LEON","LAVENIA","LAURINDA","LASHON","KIT","KIMI","KEILA","KATELYNN","KAI","JONE","JOANE","JI","JAYNA","JANELLA","JA","HUE","HERTHA","FRANCENE","ELINORE","DESPINA","DELSIE","DEEDRA","CLEMENCIA","CARRY","CAROLIN","CARLOS","BULAH","BRITTANIE","BOK","BLONDELL","BIBI","BEAULAH","BEATA","ANNITA","AGRIPINA","VIRGEN","VALENE","UN","TWANDA","TOMMYE","TOI","TARRA","TARI","TAMMERA","SHAKIA","SADYE","RUTHANNE","ROCHEL","RIVKA","PURA","NENITA","NATISHA","MING","MERRILEE","MELODEE","MARVIS","LUCILLA","LEENA","LAVETA","LARITA","LANIE","KEREN","ILEEN","GEORGEANN","GENNA","GENESIS","FRIDA","EWA","EUFEMIA","EMELY","ELA","EDYTH","DEONNA","DEADRA","DARLENA","CHANELL","CHAN","CATHERN","CASSONDRA","CASSAUNDRA","BERNARDA","BERNA","ARLINDA","ANAMARIA","ALBERT","WESLEY","VERTIE","VALERI","TORRI","TATYANA","STASIA","SHERISE","SHERILL","SEASON","SCOTTIE","SANDA","RUTHE","ROSY","ROBERTO","ROBBI","RANEE","QUYEN","PEARLY","PALMIRA","ONITA","NISHA","NIESHA","NIDA","NEVADA","NAM","MERLYN","MAYOLA","MARYLOUISE","MARYLAND","MARX","MARTH","MARGENE","MADELAINE","LONDA","LEONTINE","LEOMA","LEIA","LAWRENCE","LAURALEE","LANORA","LAKITA","KIYOKO","KETURAH","KATELIN","KAREEN","JONIE","JOHNETTE","JENEE","JEANETT","IZETTA","HIEDI","HEIKE","HASSIE","HAROLD","GIUSEPPINA","GEORGANN","FIDELA","FERNANDE","ELWANDA","ELLAMAE","ELIZ","DUSTI","DOTTY","CYNDY","CORALIE","CELESTA","ARGENTINA","ALVERTA","XENIA","WAVA","VANETTA","TORRIE","TASHINA","TANDY","TAMBRA","TAMA","STEPANIE","SHILA","SHAUNTA","SHARAN","SHANIQUA","SHAE","SETSUKO","SERAFINA","SANDEE","ROSAMARIA","PRISCILA","OLINDA","NADENE","MUOI","MICHELINA","MERCEDEZ","MARYROSE","MARIN","MARCENE","MAO","MAGALI","MAFALDA","LOGAN","LINN","LANNIE","KAYCE","KAROLINE","KAMILAH","KAMALA","JUSTA","JOLINE","JENNINE","JACQUETTA","IRAIDA","GERALD","GEORGEANNA","FRANCHESCA","FAIRY","EMELINE","ELANE","EHTEL","EARLIE","DULCIE","DALENE","CRIS","CLASSIE","CHERE","CHARIS","CAROYLN","CARMINA","CARITA","BRIAN","BETHANIE","AYAKO","ARICA","AN","ALYSA","ALESSANDRA","AKILAH","ADRIEN","ZETTA","YOULANDA","YELENA","YAHAIRA","XUAN","WENDOLYN","VICTOR","TIJUANA","TERRELL","TERINA","TERESIA","SUZI","SUNDAY","SHERELL","SHAVONDA","SHAUNTE","SHARDA","SHAKITA","SENA","RYANN","RUBI","RIVA","REGINIA","REA","RACHAL","PARTHENIA","PAMULA","MONNIE","MONET","MICHAELE","MELIA","MARINE","MALKA","MAISHA","LISANDRA","LEO","LEKISHA","LEAN","LAURENCE","LAKENDRA","KRYSTIN","KORTNEY","KIZZIE","KITTIE","KERA","KENDAL","KEMBERLY","KANISHA","JULENE","JULE","JOSHUA","JOHANNE","JEFFREY","JAMEE","HAN","HALLEY","GIDGET","GALINA","FREDRICKA","FLETA","FATIMAH","EUSEBIA","ELZA","ELEONORE","DORTHEY","DORIA","DONELLA","DINORAH","DELORSE","CLARETHA","CHRISTINIA","CHARLYN","BONG","BELKIS","AZZIE","ANDERA","AIKO","ADENA","YER","YAJAIRA","WAN","VANIA","ULRIKE","TOSHIA","TIFANY","STEFANY","SHIZUE","SHENIKA","SHAWANNA","SHAROLYN","SHARILYN","SHAQUANA","SHANTAY","SEE","ROZANNE","ROSELEE","RICKIE","REMONA","REANNA","RAELENE","QUINN","PHUNG","PETRONILA","NATACHA","NANCEY","MYRL","MIYOKO","MIESHA","MERIDETH","MARVELLA","MARQUITTA","MARHTA","MARCHELLE","LIZETH","LIBBIE","LAHOMA","LADAWN","KINA","KATHELEEN","KATHARYN","KARISA","KALEIGH","JUNIE","JULIEANN","JOHNSIE","JANEAN","JAIMEE","JACKQUELINE","HISAKO","HERMA","HELAINE","GWYNETH","GLENN","GITA","EUSTOLIA","EMELINA","ELIN","EDRIS","DONNETTE","DONNETTA","DIERDRE","DENAE","DARCEL","CLAUDE","CLARISA","CINDERELLA","CHIA","CHARLESETTA","CHARITA","CELSA","CASSY","CASSI","CARLEE","BRUNA","BRITTANEY","BRANDE","BILLI","BAO","ANTONETTA","ANGLA","ANGELYN","ANALISA","ALANE","WENONA","WENDIE","VERONIQUE","VANNESA","TOBIE","TEMPIE","SUMIKO","SULEMA","SPARKLE","SOMER","SHEBA","SHAYNE","SHARICE","SHANEL","SHALON","SAGE","ROY","ROSIO","ROSELIA","RENAY","REMA","REENA","PORSCHE","PING","PEG","OZIE","ORETHA","ORALEE","ODA","NU","NGAN","NAKESHA","MILLY","MARYBELLE","MARLIN","MARIS","MARGRETT","MARAGARET","MANIE","LURLENE","LILLIA","LIESELOTTE","LAVELLE","LASHAUNDA","LAKEESHA","KEITH","KAYCEE","KALYN","JOYA","JOETTE","JENAE","JANIECE","ILLA","GRISEL","GLAYDS","GENEVIE","GALA","FREDDA","FRED","ELMER","ELEONOR","DEBERA","DEANDREA","DAN","CORRINNE","CORDIA","CONTESSA","COLENE","CLEOTILDE","CHARLOTT","CHANTAY","CECILLE","BEATRIS","AZALEE","ARLEAN","ARDATH","ANJELICA","ANJA","ALFREDIA","ALEISHA","ADAM","ZADA","YUONNE","XIAO","WILLODEAN","WHITLEY","VENNIE","VANNA","TYISHA","TOVA","TORIE","TONISHA","TILDA","TIEN","TEMPLE","SIRENA","SHERRIL","SHANTI","SHAN","SENAIDA","SAMELLA","ROBBYN","RENDA","REITA","PHEBE","PAULITA","NOBUKO","NGUYET","NEOMI","MOON","MIKAELA","MELANIA","MAXIMINA","MARG","MAISIE","LYNNA","LILLI","LAYNE","LASHAUN","LAKENYA","LAEL","KIRSTIE","KATHLINE","KASHA","KARLYN","KARIMA","JOVAN","JOSEFINE","JENNELL","JACQUI","JACKELYN","HYO","HIEN","GRAZYNA","FLORRIE","FLORIA","ELEONORA","DWANA","DORLA","DONG","DELMY","DEJA","DEDE","DANN","CRYSTA","CLELIA","CLARIS","CLARENCE","CHIEKO","CHERLYN","CHERELLE","CHARMAIN","CHARA","CAMMY","BEE","ARNETTE","ARDELLE","ANNIKA","AMIEE","AMEE","ALLENA","YVONE","YUKI","YOSHIE","YEVETTE","YAEL","WILLETTA","VONCILE","VENETTA","TULA","TONETTE","TIMIKA","TEMIKA","TELMA","TEISHA","TAREN","TA","STACEE","SHIN","SHAWNTA","SATURNINA","RICARDA","POK","PASTY","ONIE","NUBIA","MORA","MIKE","MARIELLE","MARIELLA","MARIANELA","MARDELL","MANY","LUANNA","LOISE","LISABETH","LINDSY","LILLIANA","LILLIAM","LELAH","LEIGHA","LEANORA","LANG","KRISTEEN","KHALILAH","KEELEY","KANDRA","JUNKO","JOAQUINA","JERLENE","JANI","JAMIKA","JAME","HSIU","HERMILA","GOLDEN","GENEVIVE","EVIA","EUGENA","EMMALINE","ELFREDA","ELENE","DONETTE","DELCIE","DEEANNA","DARCEY","CUC","CLARINDA","CIRA","CHAE","CELINDA","CATHERYN","CATHERIN","CASIMIRA","CARMELIA","CAMELLIA","BREANA","BOBETTE","BERNARDINA","BEBE","BASILIA","ARLYNE","AMAL","ALAYNA","ZONIA","ZENIA","YURIKO","YAEKO","WYNELL","WILLOW","WILLENA","VERNIA","TU","TRAVIS","TORA","TERRILYN","TERICA","TENESHA","TAWNA","TAJUANA","TAINA","STEPHNIE","SONA","SOL","SINA","SHONDRA","SHIZUKO","SHERLENE","SHERICE","SHARIKA","ROSSIE","ROSENA","RORY","RIMA","RIA","RHEBA","RENNA","PETER","NATALYA","NANCEE","MELODI","MEDA","MAXIMA","MATHA","MARKETTA","MARICRUZ","MARCELENE","MALVINA","LUBA","LOUETTA","LEIDA","LECIA","LAURAN","LASHAWNA","LAINE","KHADIJAH","KATERINE","KASI","KALLIE","JULIETTA","JESUSITA","JESTINE","JESSIA","JEREMY","JEFFIE","JANYCE","ISADORA","GEORGIANNE","FIDELIA","EVITA","EURA","EULAH","ESTEFANA","ELSY","ELIZABET","ELADIA","DODIE","DION","DIA","DENISSE","DELORAS","DELILA","DAYSI","DAKOTA","CURTIS","CRYSTLE","CONCHA","COLBY","CLARETTA","CHU","CHRISTIA","CHARLSIE","CHARLENA","CARYLON","BETTYANN","ASLEY","ASHLEA","AMIRA","AI","AGUEDA","AGNUS","YUETTE","VINITA","VICTORINA","TYNISHA","TREENA","TOCCARA","TISH","THOMASENA","TEGAN","SOILA","SHILOH","SHENNA","SHARMAINE","SHANTAE","SHANDI","SEPTEMBER","SARAN","SARAI","SANA","SAMUEL","SALLEY","ROSETTE","ROLANDE","REGINE","OTELIA","OSCAR","OLEVIA","NICHOLLE","NECOLE","NAIDA","MYRTA","MYESHA","MITSUE","MINTA","MERTIE","MARGY","MAHALIA","MADALENE","LOVE","LOURA","LOREAN","LEWIS","LESHA","LEONIDA","LENITA","LAVONE","LASHELL","LASHANDRA","LAMONICA","KIMBRA","KATHERINA","KARRY","KANESHA","JULIO","JONG","JENEVA","JAQUELYN","HWA","GILMA","GHISLAINE","GERTRUDIS","FRANSISCA","FERMINA","ETTIE","ETSUKO","ELLIS","ELLAN","ELIDIA","EDRA","DORETHEA","DOREATHA","DENYSE","DENNY","DEETTA","DAINE","CYRSTAL","CORRIN","CAYLA","CARLITA","CAMILA","BURMA","BULA","BUENA","BLAKE","BARABARA","AVRIL","AUSTIN","ALAINE","ZANA","WILHEMINA","WANETTA","VIRGIL","VI","VERONIKA","VERNON","VERLINE","VASILIKI","TONITA","TISA","TEOFILA","TAYNA","TAUNYA","TANDRA","TAKAKO","SUNNI","SUANNE","SIXTA","SHARELL","SEEMA","RUSSELL","ROSENDA","ROBENA","RAYMONDE","PEI","PAMILA","OZELL","NEIDA","NEELY","MISTIE","MICHA","MERISSA","MAURITA","MARYLN","MARYETTA","MARSHALL","MARCELL","MALENA","MAKEDA","MADDIE","LOVETTA","LOURIE","LORRINE","LORILEE","LESTER","LAURENA","LASHAY","LARRAINE","LAREE","LACRESHA","KRISTLE","KRISHNA","KEVA","KEIRA","KAROLE","JOIE","JINNY","JEANNETTA","JAMA","HEIDY","GILBERTE","GEMA","FAVIOLA","EVELYNN","ENDA","ELLI","ELLENA","DIVINA","DAGNY","COLLENE","CODI","CINDIE","CHASSIDY","CHASIDY","CATRICE","CATHERINA","CASSEY","CAROLL","CARLENA","CANDRA","CALISTA","BRYANNA","BRITTENY","BEULA","BARI","AUDRIE","AUDRIA","ARDELIA","ANNELLE","ANGILA","ALONA","ALLYN","DOUGLAS","ROGER","JONATHAN","RALPH","NICHOLAS","BENJAMIN","BRUCE","HARRY","WAYNE","STEVE","HOWARD","ERNEST","PHILLIP","TODD","CRAIG","ALAN","PHILIP","EARL","DANNY","BRYAN","STANLEY","LEONARD","NATHAN","MANUEL","RODNEY","MARVIN","VINCENT","JEFFERY","JEFF","CHAD","JACOB","ALFRED","BRADLEY","HERBERT","FREDERICK","EDWIN","DON","RICKY","RANDALL","BARRY","BERNARD","LEROY","MARCUS","THEODORE","CLIFFORD","MIGUEL","JIM","TOM","CALVIN","BILL","LLOYD","DEREK","WARREN","DARRELL","JEROME","FLOYD","ALVIN","TIM","GORDON","GREG","JORGE","DUSTIN","PEDRO","DERRICK","ZACHARY","HERMAN","GLEN","HECTOR","RICARDO","RICK","BRENT","RAMON","GILBERT","MARC","REGINALD","RUBEN","NATHANIEL","RAFAEL","EDGAR","MILTON","RAUL","BEN","CHESTER","DUANE","FRANKLIN","BRAD","RON","ROLAND","ARNOLD","HARVEY","JARED","ERIK","DARRYL","NEIL","JAVIER","FERNANDO","CLINTON","TED","MATHEW","TYRONE","DARREN","LANCE","KURT","ALLAN","NELSON","GUY","CLAYTON","HUGH","MAX","DWAYNE","DWIGHT","ARMANDO","FELIX","EVERETT","IAN","WALLACE","KEN","BOB","ALFREDO","ALBERTO","DAVE","IVAN","BYRON","ISAAC","MORRIS","CLIFTON","WILLARD","ROSS","ANDY","SALVADOR","KIRK","SERGIO","SETH","KENT","TERRANCE","EDUARDO","TERRENCE","ENRIQUE","WADE","STUART","FREDRICK","ARTURO","ALEJANDRO","NICK","LUTHER","WENDELL","JEREMIAH","JULIUS","OTIS","TREVOR","OLIVER","LUKE","HOMER","GERARD","DOUG","KENNY","HUBERT","LYLE","MATT","ALFONSO","ORLANDO","REX","CARLTON","ERNESTO","NEAL","PABLO","LORENZO","OMAR","WILBUR","GRANT","HORACE","RODERICK","ABRAHAM","WILLIS","RICKEY","ANDRES","CESAR","JOHNATHAN","MALCOLM","RUDOLPH","DAMON","KELVIN","PRESTON","ALTON","ARCHIE","MARCO","WM","PETE","RANDOLPH","GARRY","GEOFFREY","JONATHON","FELIPE","GERARDO","ED","DOMINIC","DELBERT","COLIN","GUILLERMO","EARNEST","LUCAS","BENNY","SPENCER","RODOLFO","MYRON","EDMUND","GARRETT","SALVATORE","CEDRIC","LOWELL","GREGG","SHERMAN","WILSON","SYLVESTER","ROOSEVELT","ISRAEL","JERMAINE","FORREST","WILBERT","LELAND","SIMON","CLARK","IRVING","BRYANT","OWEN","RUFUS","WOODROW","KRISTOPHER","MACK","LEVI","MARCOS","GUSTAVO","JAKE","LIONEL","GILBERTO","CLINT","NICOLAS","ISMAEL","ORVILLE","ERVIN","DEWEY","AL","WILFRED","JOSH","HUGO","IGNACIO","CALEB","TOMAS","SHELDON","ERICK","STEWART","DOYLE","DARREL","ROGELIO","TERENCE","SANTIAGO","ALONZO","ELIAS","BERT","ELBERT","RAMIRO","CONRAD","NOAH","GRADY","PHIL","CORNELIUS","LAMAR","ROLANDO","CLAY","PERCY","DEXTER","BRADFORD","DARIN","AMOS","MOSES","IRVIN","SAUL","ROMAN","RANDAL","TIMMY","DARRIN","WINSTON","BRENDAN","ABEL","DOMINICK","BOYD","EMILIO","ELIJAH","DOMINGO","EMMETT","MARLON","EMANUEL","JERALD","EDMOND","EMIL","DEWAYNE","WILL","OTTO","TEDDY","REYNALDO","BRET","JESS","TRENT","HUMBERTO","EMMANUEL","STEPHAN","VICENTE","LAMONT","GARLAND","MILES","EFRAIN","HEATH","RODGER","HARLEY","ETHAN","ELDON","ROCKY","PIERRE","JUNIOR","FREDDY","ELI","BRYCE","ANTOINE","STERLING","CHASE","GROVER","ELTON","CLEVELAND","DYLAN","CHUCK","DAMIAN","REUBEN","STAN","AUGUST","LEONARDO","JASPER","RUSSEL","ERWIN","BENITO","HANS","MONTE","BLAINE","ERNIE","CURT","QUENTIN","AGUSTIN","MURRAY","JAMAL","ADOLFO","HARRISON","TYSON","BURTON","BRADY","ELLIOTT","WILFREDO","BART","JARROD","VANCE","DENIS","DAMIEN","JOAQUIN","HARLAN","DESMOND","ELLIOT","DARWIN","GREGORIO","BUDDY","XAVIER","KERMIT","ROSCOE","ESTEBAN","ANTON","SOLOMON","SCOTTY","NORBERT","ELVIN","WILLIAMS","NOLAN","ROD","QUINTON","HAL","BRAIN","ROB","ELWOOD","KENDRICK","DARIUS","MOISES","FIDEL","THADDEUS","CLIFF","MARCEL","JACKSON","RAPHAEL","BRYON","ARMAND","ALVARO","JEFFRY","DANE","JOESPH","THURMAN","NED","RUSTY","MONTY","FABIAN","REGGIE","MASON","GRAHAM","ISAIAH","VAUGHN","GUS","LOYD","DIEGO","ADOLPH","NORRIS","MILLARD","ROCCO","GONZALO","DERICK","RODRIGO","WILEY","RIGOBERTO","ALPHONSO","TY","NOE","VERN","REED","JEFFERSON","ELVIS","BERNARDO","MAURICIO","HIRAM","DONOVAN","BASIL","RILEY","NICKOLAS","MAYNARD","SCOT","VINCE","QUINCY","EDDY","SEBASTIAN","FEDERICO","ULYSSES","HERIBERTO","DONNELL","COLE","DAVIS","GAVIN","EMERY","WARD","ROMEO","JAYSON","DANTE","CLEMENT","COY","MAXWELL","JARVIS","BRUNO","ISSAC","DUDLEY","BROCK","SANFORD","CARMELO","BARNEY","NESTOR","STEFAN","DONNY","ART","LINWOOD","BEAU","WELDON","GALEN","ISIDRO","TRUMAN","DELMAR","JOHNATHON","SILAS","FREDERIC","DICK","IRWIN","MERLIN","CHARLEY","MARCELINO","HARRIS","CARLO","TRENTON","KURTIS","HUNTER","AURELIO","WINFRED","VITO","COLLIN","DENVER","CARTER","LEONEL","EMORY","PASQUALE","MOHAMMAD","MARIANO","DANIAL","LANDON","DIRK","BRANDEN","ADAN","BUFORD","GERMAN","WILMER","EMERSON","ZACHERY","FLETCHER","JACQUES","ERROL","DALTON","MONROE","JOSUE","EDWARDO","BOOKER","WILFORD","SONNY","SHELTON","CARSON","THERON","RAYMUNDO","DAREN","HOUSTON","ROBBY","LINCOLN","GENARO","BENNETT","OCTAVIO","CORNELL","HUNG","ARRON","ANTONY","HERSCHEL","GIOVANNI","GARTH","CYRUS","CYRIL","RONNY","LON","FREEMAN","DUNCAN","KENNITH","CARMINE","ERICH","CHADWICK","WILBURN","RUSS","REID","MYLES","ANDERSON","MORTON","JONAS","FOREST","MITCHEL","MERVIN","ZANE","RICH","JAMEL","LAZARO","ALPHONSE","RANDELL","MAJOR","JARRETT","BROOKS","ABDUL","LUCIANO","SEYMOUR","EUGENIO","MOHAMMED","VALENTIN","CHANCE","ARNULFO","LUCIEN","FERDINAND","THAD","EZRA","ALDO","RUBIN","ROYAL","MITCH","EARLE","ABE","WYATT","MARQUIS","LANNY","KAREEM","JAMAR","BORIS","ISIAH","EMILE","ELMO","ARON","LEOPOLDO","EVERETTE","JOSEF","ELOY","RODRICK","REINALDO","LUCIO","JERROD","WESTON","HERSHEL","BARTON","PARKER","LEMUEL","BURT","JULES","GIL","ELISEO","AHMAD","NIGEL","EFREN","ANTWAN","ALDEN","MARGARITO","COLEMAN","DINO","OSVALDO","LES","DEANDRE","NORMAND","KIETH","TREY","NORBERTO","NAPOLEON","JEROLD","FRITZ","ROSENDO","MILFORD","CHRISTOPER","ALFONZO","LYMAN","JOSIAH","BRANT","WILTON","RICO","JAMAAL","DEWITT","BRENTON","OLIN","FOSTER","FAUSTINO","CLAUDIO","JUDSON","GINO","EDGARDO","ALEC","TANNER","JARRED","DONN","TAD","PRINCE","PORFIRIO","ODIS","LENARD","CHAUNCEY","TOD","MEL","MARCELO","KORY","AUGUSTUS","KEVEN","HILARIO","BUD","SAL","ORVAL","MAURO","ZACHARIAH","OLEN","ANIBAL","MILO","JED","DILLON","AMADO","NEWTON","LENNY","RICHIE","HORACIO","BRICE","MOHAMED","DELMER","DARIO","REYES","MAC","JONAH","JERROLD","ROBT","HANK","RUPERT","ROLLAND","KENTON","DAMION","ANTONE","WALDO","FREDRIC","BRADLY","KIP","BURL","WALKER","TYREE","JEFFEREY","AHMED","WILLY","STANFORD","OREN","NOBLE","MOSHE","MIKEL","ENOCH","BRENDON","QUINTIN","JAMISON","FLORENCIO","DARRICK","TOBIAS","HASSAN","GIUSEPPE","DEMARCUS","CLETUS","TYRELL","LYNDON","KEENAN","WERNER","GERALDO","COLUMBUS","CHET","BERTRAM","MARKUS","HUEY","HILTON","DWAIN","DONTE","TYRON","OMER","ISAIAS","HIPOLITO","FERMIN","ADALBERTO","BO","BARRETT","TEODORO","MCKINLEY","MAXIMO","GARFIELD","RALEIGH","LAWERENCE","ABRAM","RASHAD","KING","EMMITT","DARON","SAMUAL","MIQUEL","EUSEBIO","DOMENIC","DARRON","BUSTER","WILBER","RENATO","JC","HOYT","HAYWOOD","EZEKIEL","CHAS","FLORENTINO","ELROY","CLEMENTE","ARDEN","NEVILLE","EDISON","DESHAWN","NATHANIAL","JORDON","DANILO","CLAUD","SHERWOOD","RAYMON","RAYFORD","CRISTOBAL","AMBROSE","TITUS","HYMAN","FELTON","EZEQUIEL","ERASMO","STANTON","LONNY","LEN","IKE","MILAN","LINO","JAROD","HERB","ANDREAS","WALTON","RHETT","PALMER","DOUGLASS","CORDELL","OSWALDO","ELLSWORTH","VIRGILIO","TONEY","NATHANAEL","DEL","BENEDICT","MOSE","JOHNSON","ISREAL","GARRET","FAUSTO","ASA","ARLEN","ZACK","WARNER","MODESTO","FRANCESCO","MANUAL","GAYLORD","GASTON","FILIBERTO","DEANGELO","MICHALE","GRANVILLE","WES","MALIK","ZACKARY","TUAN","ELDRIDGE","CRISTOPHER","CORTEZ","ANTIONE","MALCOM","LONG","KOREY","JOSPEH","COLTON","WAYLON","VON","HOSEA","SHAD","SANTO","RUDOLF","ROLF","REY","RENALDO","MARCELLUS","LUCIUS","KRISTOFER","BOYCE","BENTON","HAYDEN","HARLAND","ARNOLDO","RUEBEN","LEANDRO","KRAIG","JERRELL","JEROMY","HOBERT","CEDRICK","ARLIE","WINFORD","WALLY","LUIGI","KENETH","JACINTO","GRAIG","FRANKLYN","EDMUNDO","SID","PORTER","LEIF","JERAMY","BUCK","WILLIAN","VINCENZO","SHON","LYNWOOD","JERE","HAI","ELDEN","DORSEY","DARELL","BRODERICK","ALONSO" \ No newline at end of file diff --git a/Project Euler/Problem 22/sol1.py b/Project Euler/Problem 22/sol1.py deleted file mode 100644 index 775430658..000000000 --- a/Project Euler/Problem 22/sol1.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: latin-1 -*- -from __future__ import print_function -''' -Name scores -Problem 22 - -Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it -into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list -to obtain a name score. - -For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. -So, COLIN would obtain a score of 938 × 53 = 49714. - -What is the total of all the name scores in the file? -''' -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -with open('p022_names.txt') as file: - names = str(file.readlines()[0]) - names = names.replace('"', '').split(',') - -names.sort() - -name_score = 0 -total_score = 0 - -for i, name in enumerate(names): - for letter in name: - name_score += ord(letter) - 64 - - total_score += (i+1)*name_score - name_score = 0 - -print(total_score) \ No newline at end of file diff --git a/Project Euler/Problem 22/sol2.py b/Project Euler/Problem 22/sol2.py deleted file mode 100644 index d7f9abf09..000000000 --- a/Project Euler/Problem 22/sol2.py +++ /dev/null @@ -1,533 +0,0 @@ -def main(): - name = [ - "MARY", "PATRICIA", "LINDA", "BARBARA", "ELIZABETH", "JENNIFER", "MARIA", "SUSAN", "MARGARET", "DOROTHY", - "LISA", "NANCY", "KAREN", "BETTY", "HELEN", "SANDRA", "DONNA", "CAROL", "RUTH", "SHARON", - "MICHELLE", "LAURA", "SARAH", "KIMBERLY", "DEBORAH", "JESSICA", "SHIRLEY", "CYNTHIA", "ANGELA", "MELISSA", - "BRENDA", "AMY", "ANNA", "REBECCA", "VIRGINIA", "KATHLEEN", "PAMELA", "MARTHA", "DEBRA", "AMANDA", - "STEPHANIE", "CAROLYN", "CHRISTINE", "MARIE", "JANET", "CATHERINE", "FRANCES", "ANN", "JOYCE", "DIANE", - "ALICE", "JULIE", "HEATHER", "TERESA", "DORIS", "GLORIA", "EVELYN", "JEAN", "CHERYL", "MILDRED", - "KATHERINE", "JOAN", "ASHLEY", "JUDITH", "ROSE", "JANICE", "KELLY", "NICOLE", "JUDY", "CHRISTINA", - "KATHY", "THERESA", "BEVERLY", "DENISE", "TAMMY", "IRENE", "JANE", "LORI", "RACHEL", "MARILYN", - "ANDREA", "KATHRYN", "LOUISE", "SARA", "ANNE", "JACQUELINE", "WANDA", "BONNIE", "JULIA", "RUBY", - "LOIS", "TINA", "PHYLLIS", "NORMA", "PAULA", "DIANA", "ANNIE", "LILLIAN", "EMILY", "ROBIN", - "PEGGY", "CRYSTAL", "GLADYS", "RITA", "DAWN", "CONNIE", "FLORENCE", "TRACY", "EDNA", "TIFFANY", - "CARMEN", "ROSA", "CINDY", "GRACE", "WENDY", "VICTORIA", "EDITH", "KIM", "SHERRY", "SYLVIA", - "JOSEPHINE", "THELMA", "SHANNON", "SHEILA", "ETHEL", "ELLEN", "ELAINE", "MARJORIE", "CARRIE", "CHARLOTTE", - "MONICA", "ESTHER", "PAULINE", "EMMA", "JUANITA", "ANITA", "RHONDA", "HAZEL", "AMBER", "EVA", - "DEBBIE", "APRIL", "LESLIE", "CLARA", "LUCILLE", "JAMIE", "JOANNE", "ELEANOR", "VALERIE", "DANIELLE", - "MEGAN", "ALICIA", "SUZANNE", "MICHELE", "GAIL", "BERTHA", "DARLENE", "VERONICA", "JILL", "ERIN", - "GERALDINE", "LAUREN", "CATHY", "JOANN", "LORRAINE", "LYNN", "SALLY", "REGINA", "ERICA", "BEATRICE", - "DOLORES", "BERNICE", "AUDREY", "YVONNE", "ANNETTE", "JUNE", "SAMANTHA", "MARION", "DANA", "STACY", - "ANA", "RENEE", "IDA", "VIVIAN", "ROBERTA", "HOLLY", "BRITTANY", "MELANIE", "LORETTA", "YOLANDA", - "JEANETTE", "LAURIE", "KATIE", "KRISTEN", "VANESSA", "ALMA", "SUE", "ELSIE", "BETH", "JEANNE", - "VICKI", "CARLA", "TARA", "ROSEMARY", "EILEEN", "TERRI", "GERTRUDE", "LUCY", "TONYA", "ELLA", - "STACEY", "WILMA", "GINA", "KRISTIN", "JESSIE", "NATALIE", "AGNES", "VERA", "WILLIE", "CHARLENE", - "BESSIE", "DELORES", "MELINDA", "PEARL", "ARLENE", "MAUREEN", "COLLEEN", "ALLISON", "TAMARA", "JOY", - "GEORGIA", "CONSTANCE", "LILLIE", "CLAUDIA", "JACKIE", "MARCIA", "TANYA", "NELLIE", "MINNIE", "MARLENE", - "HEIDI", "GLENDA", "LYDIA", "VIOLA", "COURTNEY", "MARIAN", "STELLA", "CAROLINE", "DORA", "JO", - "VICKIE", "MATTIE", "TERRY", "MAXINE", "IRMA", "MABEL", "MARSHA", "MYRTLE", "LENA", "CHRISTY", - "DEANNA", "PATSY", "HILDA", "GWENDOLYN", "JENNIE", "NORA", "MARGIE", "NINA", "CASSANDRA", "LEAH", - "PENNY", "KAY", "PRISCILLA", "NAOMI", "CAROLE", "BRANDY", "OLGA", "BILLIE", "DIANNE", "TRACEY", - "LEONA", "JENNY", "FELICIA", "SONIA", "MIRIAM", "VELMA", "BECKY", "BOBBIE", "VIOLET", "KRISTINA", - "TONI", "MISTY", "MAE", "SHELLY", "DAISY", "RAMONA", "SHERRI", "ERIKA", "KATRINA", "CLAIRE", - "LINDSEY", "LINDSAY", "GENEVA", "GUADALUPE", "BELINDA", "MARGARITA", "SHERYL", "CORA", "FAYE", "ADA", - "NATASHA", "SABRINA", "ISABEL", "MARGUERITE", "HATTIE", "HARRIET", "MOLLY", "CECILIA", "KRISTI", "BRANDI", - "BLANCHE", "SANDY", "ROSIE", "JOANNA", "IRIS", "EUNICE", "ANGIE", "INEZ", "LYNDA", "MADELINE", - "AMELIA", "ALBERTA", "GENEVIEVE", "MONIQUE", "JODI", "JANIE", "MAGGIE", "KAYLA", "SONYA", "JAN", - "LEE", "KRISTINE", "CANDACE", "FANNIE", "MARYANN", "OPAL", "ALISON", "YVETTE", "MELODY", "LUZ", - "SUSIE", "OLIVIA", "FLORA", "SHELLEY", "KRISTY", "MAMIE", "LULA", "LOLA", "VERNA", "BEULAH", - "ANTOINETTE", "CANDICE", "JUANA", "JEANNETTE", "PAM", "KELLI", "HANNAH", "WHITNEY", "BRIDGET", "KARLA", - "CELIA", "LATOYA", "PATTY", "SHELIA", "GAYLE", "DELLA", "VICKY", "LYNNE", "SHERI", "MARIANNE", - "KARA", "JACQUELYN", "ERMA", "BLANCA", "MYRA", "LETICIA", "PAT", "KRISTA", "ROXANNE", "ANGELICA", - "JOHNNIE", "ROBYN", "FRANCIS", "ADRIENNE", "ROSALIE", "ALEXANDRA", "BROOKE", "BETHANY", "SADIE", "BERNADETTE", - "TRACI", "JODY", "KENDRA", "JASMINE", "NICHOLE", "RACHAEL", "CHELSEA", "MABLE", "ERNESTINE", "MURIEL", - "MARCELLA", "ELENA", "KRYSTAL", "ANGELINA", "NADINE", "KARI", "ESTELLE", "DIANNA", "PAULETTE", "LORA", - "MONA", "DOREEN", "ROSEMARIE", "ANGEL", "DESIREE", "ANTONIA", "HOPE", "GINGER", "JANIS", "BETSY", - "CHRISTIE", "FREDA", "MERCEDES", "MEREDITH", "LYNETTE", "TERI", "CRISTINA", "EULA", "LEIGH", "MEGHAN", - "SOPHIA", "ELOISE", "ROCHELLE", "GRETCHEN", "CECELIA", "RAQUEL", "HENRIETTA", "ALYSSA", "JANA", "KELLEY", - "GWEN", "KERRY", "JENNA", "TRICIA", "LAVERNE", "OLIVE", "ALEXIS", "TASHA", "SILVIA", "ELVIRA", - "CASEY", "DELIA", "SOPHIE", "KATE", "PATTI", "LORENA", "KELLIE", "SONJA", "LILA", "LANA", - "DARLA", "MAY", "MINDY", "ESSIE", "MANDY", "LORENE", "ELSA", "JOSEFINA", "JEANNIE", "MIRANDA", - "DIXIE", "LUCIA", "MARTA", "FAITH", "LELA", "JOHANNA", "SHARI", "CAMILLE", "TAMI", "SHAWNA", - "ELISA", "EBONY", "MELBA", "ORA", "NETTIE", "TABITHA", "OLLIE", "JAIME", "WINIFRED", "KRISTIE", - "MARINA", "ALISHA", "AIMEE", "RENA", "MYRNA", "MARLA", "TAMMIE", "LATASHA", "BONITA", "PATRICE", - "RONDA", "SHERRIE", "ADDIE", "FRANCINE", "DELORIS", "STACIE", "ADRIANA", "CHERI", "SHELBY", "ABIGAIL", - "CELESTE", "JEWEL", "CARA", "ADELE", "REBEKAH", "LUCINDA", "DORTHY", "CHRIS", "EFFIE", "TRINA", - "REBA", "SHAWN", "SALLIE", "AURORA", "LENORA", "ETTA", "LOTTIE", "KERRI", "TRISHA", "NIKKI", - "ESTELLA", "FRANCISCA", "JOSIE", "TRACIE", "MARISSA", "KARIN", "BRITTNEY", "JANELLE", "LOURDES", "LAUREL", - "HELENE", "FERN", "ELVA", "CORINNE", "KELSEY", "INA", "BETTIE", "ELISABETH", "AIDA", "CAITLIN", - "INGRID", "IVA", "EUGENIA", "CHRISTA", "GOLDIE", "CASSIE", "MAUDE", "JENIFER", "THERESE", "FRANKIE", - "DENA", "LORNA", "JANETTE", "LATONYA", "CANDY", "MORGAN", "CONSUELO", "TAMIKA", "ROSETTA", "DEBORA", - "CHERIE", "POLLY", "DINA", "JEWELL", "FAY", "JILLIAN", "DOROTHEA", "NELL", "TRUDY", "ESPERANZA", - "PATRICA", "KIMBERLEY", "SHANNA", "HELENA", "CAROLINA", "CLEO", "STEFANIE", "ROSARIO", "OLA", "JANINE", - "MOLLIE", "LUPE", "ALISA", "LOU", "MARIBEL", "SUSANNE", "BETTE", "SUSANA", "ELISE", "CECILE", - "ISABELLE", "LESLEY", "JOCELYN", "PAIGE", "JONI", "RACHELLE", "LEOLA", "DAPHNE", "ALTA", "ESTER", - "PETRA", "GRACIELA", "IMOGENE", "JOLENE", "KEISHA", "LACEY", "GLENNA", "GABRIELA", "KERI", "URSULA", - "LIZZIE", "KIRSTEN", "SHANA", "ADELINE", "MAYRA", "JAYNE", "JACLYN", "GRACIE", "SONDRA", "CARMELA", - "MARISA", "ROSALIND", "CHARITY", "TONIA", "BEATRIZ", "MARISOL", "CLARICE", "JEANINE", "SHEENA", "ANGELINE", - "FRIEDA", "LILY", "ROBBIE", "SHAUNA", "MILLIE", "CLAUDETTE", "CATHLEEN", "ANGELIA", "GABRIELLE", "AUTUMN", - "KATHARINE", "SUMMER", "JODIE", "STACI", "LEA", "CHRISTI", "JIMMIE", "JUSTINE", "ELMA", "LUELLA", - "MARGRET", "DOMINIQUE", "SOCORRO", "RENE", "MARTINA", "MARGO", "MAVIS", "CALLIE", "BOBBI", "MARITZA", - "LUCILE", "LEANNE", "JEANNINE", "DEANA", "AILEEN", "LORIE", "LADONNA", "WILLA", "MANUELA", "GALE", - "SELMA", "DOLLY", "SYBIL", "ABBY", "LARA", "DALE", "IVY", "DEE", "WINNIE", "MARCY", - "LUISA", "JERI", "MAGDALENA", "OFELIA", "MEAGAN", "AUDRA", "MATILDA", "LEILA", "CORNELIA", "BIANCA", - "SIMONE", "BETTYE", "RANDI", "VIRGIE", "LATISHA", "BARBRA", "GEORGINA", "ELIZA", "LEANN", "BRIDGETTE", - "RHODA", "HALEY", "ADELA", "NOLA", "BERNADINE", "FLOSSIE", "ILA", "GRETA", "RUTHIE", "NELDA", - "MINERVA", "LILLY", "TERRIE", "LETHA", "HILARY", "ESTELA", "VALARIE", "BRIANNA", "ROSALYN", "EARLINE", - "CATALINA", "AVA", "MIA", "CLARISSA", "LIDIA", "CORRINE", "ALEXANDRIA", "CONCEPCION", "TIA", "SHARRON", - "RAE", "DONA", "ERICKA", "JAMI", "ELNORA", "CHANDRA", "LENORE", "NEVA", "MARYLOU", "MELISA", - "TABATHA", "SERENA", "AVIS", "ALLIE", "SOFIA", "JEANIE", "ODESSA", "NANNIE", "HARRIETT", "LORAINE", - "PENELOPE", "MILAGROS", "EMILIA", "BENITA", "ALLYSON", "ASHLEE", "TANIA", "TOMMIE", "ESMERALDA", "KARINA", - "EVE", "PEARLIE", "ZELMA", "MALINDA", "NOREEN", "TAMEKA", "SAUNDRA", "HILLARY", "AMIE", "ALTHEA", - "ROSALINDA", "JORDAN", "LILIA", "ALANA", "GAY", "CLARE", "ALEJANDRA", "ELINOR", "MICHAEL", "LORRIE", - "JERRI", "DARCY", "EARNESTINE", "CARMELLA", "TAYLOR", "NOEMI", "MARCIE", "LIZA", "ANNABELLE", "LOUISA", - "EARLENE", "MALLORY", "CARLENE", "NITA", "SELENA", "TANISHA", "KATY", "JULIANNE", "JOHN", "LAKISHA", - "EDWINA", "MARICELA", "MARGERY", "KENYA", "DOLLIE", "ROXIE", "ROSLYN", "KATHRINE", "NANETTE", "CHARMAINE", - "LAVONNE", "ILENE", "KRIS", "TAMMI", "SUZETTE", "CORINE", "KAYE", "JERRY", "MERLE", "CHRYSTAL", - "LINA", "DEANNE", "LILIAN", "JULIANA", "ALINE", "LUANN", "KASEY", "MARYANNE", "EVANGELINE", "COLETTE", - "MELVA", "LAWANDA", "YESENIA", "NADIA", "MADGE", "KATHIE", "EDDIE", "OPHELIA", "VALERIA", "NONA", - "MITZI", "MARI", "GEORGETTE", "CLAUDINE", "FRAN", "ALISSA", "ROSEANN", "LAKEISHA", "SUSANNA", "REVA", - "DEIDRE", "CHASITY", "SHEREE", "CARLY", "JAMES", "ELVIA", "ALYCE", "DEIRDRE", "GENA", "BRIANA", - "ARACELI", "KATELYN", "ROSANNE", "WENDI", "TESSA", "BERTA", "MARVA", "IMELDA", "MARIETTA", "MARCI", - "LEONOR", "ARLINE", "SASHA", "MADELYN", "JANNA", "JULIETTE", "DEENA", "AURELIA", "JOSEFA", "AUGUSTA", - "LILIANA", "YOUNG", "CHRISTIAN", "LESSIE", "AMALIA", "SAVANNAH", "ANASTASIA", "VILMA", "NATALIA", "ROSELLA", - "LYNNETTE", "CORINA", "ALFREDA", "LEANNA", "CAREY", "AMPARO", "COLEEN", "TAMRA", "AISHA", "WILDA", - "KARYN", "CHERRY", "QUEEN", "MAURA", "MAI", "EVANGELINA", "ROSANNA", "HALLIE", "ERNA", "ENID", - "MARIANA", "LACY", "JULIET", "JACKLYN", "FREIDA", "MADELEINE", "MARA", "HESTER", "CATHRYN", "LELIA", - "CASANDRA", "BRIDGETT", "ANGELITA", "JANNIE", "DIONNE", "ANNMARIE", "KATINA", "BERYL", "PHOEBE", "MILLICENT", - "KATHERYN", "DIANN", "CARISSA", "MARYELLEN", "LIZ", "LAURI", "HELGA", "GILDA", "ADRIAN", "RHEA", - "MARQUITA", "HOLLIE", "TISHA", "TAMERA", "ANGELIQUE", "FRANCESCA", "BRITNEY", "KAITLIN", "LOLITA", "FLORINE", - "ROWENA", "REYNA", "TWILA", "FANNY", "JANELL", "INES", "CONCETTA", "BERTIE", "ALBA", "BRIGITTE", - "ALYSON", "VONDA", "PANSY", "ELBA", "NOELLE", "LETITIA", "KITTY", "DEANN", "BRANDIE", "LOUELLA", - "LETA", "FELECIA", "SHARLENE", "LESA", "BEVERLEY", "ROBERT", "ISABELLA", "HERMINIA", "TERRA", "CELINA", - "TORI", "OCTAVIA", "JADE", "DENICE", "GERMAINE", "SIERRA", "MICHELL", "CORTNEY", "NELLY", "DORETHA", - "SYDNEY", "DEIDRA", "MONIKA", "LASHONDA", "JUDI", "CHELSEY", "ANTIONETTE", "MARGOT", "BOBBY", "ADELAIDE", - "NAN", "LEEANN", "ELISHA", "DESSIE", "LIBBY", "KATHI", "GAYLA", "LATANYA", "MINA", "MELLISA", - "KIMBERLEE", "JASMIN", "RENAE", "ZELDA", "ELDA", "MA", "JUSTINA", "GUSSIE", "EMILIE", "CAMILLA", - "ABBIE", "ROCIO", "KAITLYN", "JESSE", "EDYTHE", "ASHLEIGH", "SELINA", "LAKESHA", "GERI", "ALLENE", - "PAMALA", "MICHAELA", "DAYNA", "CARYN", "ROSALIA", "SUN", "JACQULINE", "REBECA", "MARYBETH", "KRYSTLE", - "IOLA", "DOTTIE", "BENNIE", "BELLE", "AUBREY", "GRISELDA", "ERNESTINA", "ELIDA", "ADRIANNE", "DEMETRIA", - "DELMA", "CHONG", "JAQUELINE", "DESTINY", "ARLEEN", "VIRGINA", "RETHA", "FATIMA", "TILLIE", "ELEANORE", - "CARI", "TREVA", "BIRDIE", "WILHELMINA", "ROSALEE", "MAURINE", "LATRICE", "YONG", "JENA", "TARYN", - "ELIA", "DEBBY", "MAUDIE", "JEANNA", "DELILAH", "CATRINA", "SHONDA", "HORTENCIA", "THEODORA", "TERESITA", - "ROBBIN", "DANETTE", "MARYJANE", "FREDDIE", "DELPHINE", "BRIANNE", "NILDA", "DANNA", "CINDI", "BESS", - "IONA", "HANNA", "ARIEL", "WINONA", "VIDA", "ROSITA", "MARIANNA", "WILLIAM", "RACHEAL", "GUILLERMINA", - "ELOISA", "CELESTINE", "CAREN", "MALISSA", "LONA", "CHANTEL", "SHELLIE", "MARISELA", "LEORA", "AGATHA", - "SOLEDAD", "MIGDALIA", "IVETTE", "CHRISTEN", "ATHENA", "JANEL", "CHLOE", "VEDA", "PATTIE", "TESSIE", - "TERA", "MARILYNN", "LUCRETIA", "KARRIE", "DINAH", "DANIELA", "ALECIA", "ADELINA", "VERNICE", "SHIELA", - "PORTIA", "MERRY", "LASHAWN", "DEVON", "DARA", "TAWANA", "OMA", "VERDA", "CHRISTIN", "ALENE", - "ZELLA", "SANDI", "RAFAELA", "MAYA", "KIRA", "CANDIDA", "ALVINA", "SUZAN", "SHAYLA", "LYN", - "LETTIE", "ALVA", "SAMATHA", "ORALIA", "MATILDE", "MADONNA", "LARISSA", "VESTA", "RENITA", "INDIA", - "DELOIS", "SHANDA", "PHILLIS", "LORRI", "ERLINDA", "CRUZ", "CATHRINE", "BARB", "ZOE", "ISABELL", - "IONE", "GISELA", "CHARLIE", "VALENCIA", "ROXANNA", "MAYME", "KISHA", "ELLIE", "MELLISSA", "DORRIS", - "DALIA", "BELLA", "ANNETTA", "ZOILA", "RETA", "REINA", "LAURETTA", "KYLIE", "CHRISTAL", "PILAR", - "CHARLA", "ELISSA", "TIFFANI", "TANA", "PAULINA", "LEOTA", "BREANNA", "JAYME", "CARMEL", "VERNELL", - "TOMASA", "MANDI", "DOMINGA", "SANTA", "MELODIE", "LURA", "ALEXA", "TAMELA", "RYAN", "MIRNA", - "KERRIE", "VENUS", "NOEL", "FELICITA", "CRISTY", "CARMELITA", "BERNIECE", "ANNEMARIE", "TIARA", "ROSEANNE", - "MISSY", "CORI", "ROXANA", "PRICILLA", "KRISTAL", "JUNG", "ELYSE", "HAYDEE", "ALETHA", "BETTINA", - "MARGE", "GILLIAN", "FILOMENA", "CHARLES", "ZENAIDA", "HARRIETTE", "CARIDAD", "VADA", "UNA", "ARETHA", - "PEARLINE", "MARJORY", "MARCELA", "FLOR", "EVETTE", "ELOUISE", "ALINA", "TRINIDAD", "DAVID", "DAMARIS", - "CATHARINE", "CARROLL", "BELVA", "NAKIA", "MARLENA", "LUANNE", "LORINE", "KARON", "DORENE", "DANITA", - "BRENNA", "TATIANA", "SAMMIE", "LOUANN", "LOREN", "JULIANNA", "ANDRIA", "PHILOMENA", "LUCILA", "LEONORA", - "DOVIE", "ROMONA", "MIMI", "JACQUELIN", "GAYE", "TONJA", "MISTI", "JOE", "GENE", "CHASTITY", - "STACIA", "ROXANN", "MICAELA", "NIKITA", "MEI", "VELDA", "MARLYS", "JOHNNA", "AURA", "LAVERN", - "IVONNE", "HAYLEY", "NICKI", "MAJORIE", "HERLINDA", "GEORGE", "ALPHA", "YADIRA", "PERLA", "GREGORIA", - "DANIEL", "ANTONETTE", "SHELLI", "MOZELLE", "MARIAH", "JOELLE", "CORDELIA", "JOSETTE", "CHIQUITA", "TRISTA", - "LOUIS", "LAQUITA", "GEORGIANA", "CANDI", "SHANON", "LONNIE", "HILDEGARD", "CECIL", "VALENTINA", "STEPHANY", - "MAGDA", "KAROL", "GERRY", "GABRIELLA", "TIANA", "ROMA", "RICHELLE", "RAY", "PRINCESS", "OLETA", - "JACQUE", "IDELLA", "ALAINA", "SUZANNA", "JOVITA", "BLAIR", "TOSHA", "RAVEN", "NEREIDA", "MARLYN", - "KYLA", "JOSEPH", "DELFINA", "TENA", "STEPHENIE", "SABINA", "NATHALIE", "MARCELLE", "GERTIE", "DARLEEN", - "THEA", "SHARONDA", "SHANTEL", "BELEN", "VENESSA", "ROSALINA", "ONA", "GENOVEVA", "COREY", "CLEMENTINE", - "ROSALBA", "RENATE", "RENATA", "MI", "IVORY", "GEORGIANNA", "FLOY", "DORCAS", "ARIANA", "TYRA", - "THEDA", "MARIAM", "JULI", "JESICA", "DONNIE", "VIKKI", "VERLA", "ROSELYN", "MELVINA", "JANNETTE", - "GINNY", "DEBRAH", "CORRIE", "ASIA", "VIOLETA", "MYRTIS", "LATRICIA", "COLLETTE", "CHARLEEN", "ANISSA", - "VIVIANA", "TWYLA", "PRECIOUS", "NEDRA", "LATONIA", "LAN", "HELLEN", "FABIOLA", "ANNAMARIE", "ADELL", - "SHARYN", "CHANTAL", "NIKI", "MAUD", "LIZETTE", "LINDY", "KIA", "KESHA", "JEANA", "DANELLE", - "CHARLINE", "CHANEL", "CARROL", "VALORIE", "LIA", "DORTHA", "CRISTAL", "SUNNY", "LEONE", "LEILANI", - "GERRI", "DEBI", "ANDRA", "KESHIA", "IMA", "EULALIA", "EASTER", "DULCE", "NATIVIDAD", "LINNIE", - "KAMI", "GEORGIE", "CATINA", "BROOK", "ALDA", "WINNIFRED", "SHARLA", "RUTHANN", "MEAGHAN", "MAGDALENE", - "LISSETTE", "ADELAIDA", "VENITA", "TRENA", "SHIRLENE", "SHAMEKA", "ELIZEBETH", "DIAN", "SHANTA", "MICKEY", - "LATOSHA", "CARLOTTA", "WINDY", "SOON", "ROSINA", "MARIANN", "LEISA", "JONNIE", "DAWNA", "CATHIE", - "BILLY", "ASTRID", "SIDNEY", "LAUREEN", "JANEEN", "HOLLI", "FAWN", "VICKEY", "TERESSA", "SHANTE", - "RUBYE", "MARCELINA", "CHANDA", "CARY", "TERESE", "SCARLETT", "MARTY", "MARNIE", "LULU", "LISETTE", - "JENIFFER", "ELENOR", "DORINDA", "DONITA", "CARMAN", "BERNITA", "ALTAGRACIA", "ALETA", "ADRIANNA", "ZORAIDA", - "RONNIE", "NICOLA", "LYNDSEY", "KENDALL", "JANINA", "CHRISSY", "AMI", "STARLA", "PHYLIS", "PHUONG", - "KYRA", "CHARISSE", "BLANCH", "SANJUANITA", "RONA", "NANCI", "MARILEE", "MARANDA", "CORY", "BRIGETTE", - "SANJUANA", "MARITA", "KASSANDRA", "JOYCELYN", "IRA", "FELIPA", "CHELSIE", "BONNY", "MIREYA", "LORENZA", - "KYONG", "ILEANA", "CANDELARIA", "TONY", "TOBY", "SHERIE", "OK", "MARK", "LUCIE", "LEATRICE", - "LAKESHIA", "GERDA", "EDIE", "BAMBI", "MARYLIN", "LAVON", "HORTENSE", "GARNET", "EVIE", "TRESSA", - "SHAYNA", "LAVINA", "KYUNG", "JEANETTA", "SHERRILL", "SHARA", "PHYLISS", "MITTIE", "ANABEL", "ALESIA", - "THUY", "TAWANDA", "RICHARD", "JOANIE", "TIFFANIE", "LASHANDA", "KARISSA", "ENRIQUETA", "DARIA", "DANIELLA", - "CORINNA", "ALANNA", "ABBEY", "ROXANE", "ROSEANNA", "MAGNOLIA", "LIDA", "KYLE", "JOELLEN", "ERA", - "CORAL", "CARLEEN", "TRESA", "PEGGIE", "NOVELLA", "NILA", "MAYBELLE", "JENELLE", "CARINA", "NOVA", - "MELINA", "MARQUERITE", "MARGARETTE", "JOSEPHINA", "EVONNE", "DEVIN", "CINTHIA", "ALBINA", "TOYA", "TAWNYA", - "SHERITA", "SANTOS", "MYRIAM", "LIZABETH", "LISE", "KEELY", "JENNI", "GISELLE", "CHERYLE", "ARDITH", - "ARDIS", "ALESHA", "ADRIANE", "SHAINA", "LINNEA", "KAROLYN", "HONG", "FLORIDA", "FELISHA", "DORI", - "DARCI", "ARTIE", "ARMIDA", "ZOLA", "XIOMARA", "VERGIE", "SHAMIKA", "NENA", "NANNETTE", "MAXIE", - "LOVIE", "JEANE", "JAIMIE", "INGE", "FARRAH", "ELAINA", "CAITLYN", "STARR", "FELICITAS", "CHERLY", - "CARYL", "YOLONDA", "YASMIN", "TEENA", "PRUDENCE", "PENNIE", "NYDIA", "MACKENZIE", "ORPHA", "MARVEL", - "LIZBETH", "LAURETTE", "JERRIE", "HERMELINDA", "CAROLEE", "TIERRA", "MIRIAN", "META", "MELONY", "KORI", - "JENNETTE", "JAMILA", "ENA", "ANH", "YOSHIKO", "SUSANNAH", "SALINA", "RHIANNON", "JOLEEN", "CRISTINE", - "ASHTON", "ARACELY", "TOMEKA", "SHALONDA", "MARTI", "LACIE", "KALA", "JADA", "ILSE", "HAILEY", - "BRITTANI", "ZONA", "SYBLE", "SHERRYL", "RANDY", "NIDIA", "MARLO", "KANDICE", "KANDI", "DEB", - "DEAN", "AMERICA", "ALYCIA", "TOMMY", "RONNA", "NORENE", "MERCY", "JOSE", "INGEBORG", "GIOVANNA", - "GEMMA", "CHRISTEL", "AUDRY", "ZORA", "VITA", "VAN", "TRISH", "STEPHAINE", "SHIRLEE", "SHANIKA", - "MELONIE", "MAZIE", "JAZMIN", "INGA", "HOA", "HETTIE", "GERALYN", "FONDA", "ESTRELLA", "ADELLA", - "SU", "SARITA", "RINA", "MILISSA", "MARIBETH", "GOLDA", "EVON", "ETHELYN", "ENEDINA", "CHERISE", - "CHANA", "VELVA", "TAWANNA", "SADE", "MIRTA", "LI", "KARIE", "JACINTA", "ELNA", "DAVINA", - "CIERRA", "ASHLIE", "ALBERTHA", "TANESHA", "STEPHANI", "NELLE", "MINDI", "LU", "LORINDA", "LARUE", - "FLORENE", "DEMETRA", "DEDRA", "CIARA", "CHANTELLE", "ASHLY", "SUZY", "ROSALVA", "NOELIA", "LYDA", - "LEATHA", "KRYSTYNA", "KRISTAN", "KARRI", "DARLINE", "DARCIE", "CINDA", "CHEYENNE", "CHERRIE", "AWILDA", - "ALMEDA", "ROLANDA", "LANETTE", "JERILYN", "GISELE", "EVALYN", "CYNDI", "CLETA", "CARIN", "ZINA", - "ZENA", "VELIA", "TANIKA", "PAUL", "CHARISSA", "THOMAS", "TALIA", "MARGARETE", "LAVONDA", "KAYLEE", - "KATHLENE", "JONNA", "IRENA", "ILONA", "IDALIA", "CANDIS", "CANDANCE", "BRANDEE", "ANITRA", "ALIDA", - "SIGRID", "NICOLETTE", "MARYJO", "LINETTE", "HEDWIG", "CHRISTIANA", "CASSIDY", "ALEXIA", "TRESSIE", "MODESTA", - "LUPITA", "LITA", "GLADIS", "EVELIA", "DAVIDA", "CHERRI", "CECILY", "ASHELY", "ANNABEL", "AGUSTINA", - "WANITA", "SHIRLY", "ROSAURA", "HULDA", "EUN", "BAILEY", "YETTA", "VERONA", "THOMASINA", "SIBYL", - "SHANNAN", "MECHELLE", "LUE", "LEANDRA", "LANI", "KYLEE", "KANDY", "JOLYNN", "FERNE", "EBONI", - "CORENE", "ALYSIA", "ZULA", "NADA", "MOIRA", "LYNDSAY", "LORRETTA", "JUAN", "JAMMIE", "HORTENSIA", - "GAYNELL", "CAMERON", "ADRIA", "VINA", "VICENTA", "TANGELA", "STEPHINE", "NORINE", "NELLA", "LIANA", - "LESLEE", "KIMBERELY", "ILIANA", "GLORY", "FELICA", "EMOGENE", "ELFRIEDE", "EDEN", "EARTHA", "CARMA", - "BEA", "OCIE", "MARRY", "LENNIE", "KIARA", "JACALYN", "CARLOTA", "ARIELLE", "YU", "STAR", - "OTILIA", "KIRSTIN", "KACEY", "JOHNETTA", "JOEY", "JOETTA", "JERALDINE", "JAUNITA", "ELANA", "DORTHEA", - "CAMI", "AMADA", "ADELIA", "VERNITA", "TAMAR", "SIOBHAN", "RENEA", "RASHIDA", "OUIDA", "ODELL", - "NILSA", "MERYL", "KRISTYN", "JULIETA", "DANICA", "BREANNE", "AUREA", "ANGLEA", "SHERRON", "ODETTE", - "MALIA", "LORELEI", "LIN", "LEESA", "KENNA", "KATHLYN", "FIONA", "CHARLETTE", "SUZIE", "SHANTELL", - "SABRA", "RACQUEL", "MYONG", "MIRA", "MARTINE", "LUCIENNE", "LAVADA", "JULIANN", "JOHNIE", "ELVERA", - "DELPHIA", "CLAIR", "CHRISTIANE", "CHAROLETTE", "CARRI", "AUGUSTINE", "ASHA", "ANGELLA", "PAOLA", "NINFA", - "LEDA", "LAI", "EDA", "SUNSHINE", "STEFANI", "SHANELL", "PALMA", "MACHELLE", "LISSA", "KECIA", - "KATHRYNE", "KARLENE", "JULISSA", "JETTIE", "JENNIFFER", "HUI", "CORRINA", "CHRISTOPHER", "CAROLANN", "ALENA", - "TESS", "ROSARIA", "MYRTICE", "MARYLEE", "LIANE", "KENYATTA", "JUDIE", "JANEY", "IN", "ELMIRA", - "ELDORA", "DENNA", "CRISTI", "CATHI", "ZAIDA", "VONNIE", "VIVA", "VERNIE", "ROSALINE", "MARIELA", - "LUCIANA", "LESLI", "KARAN", "FELICE", "DENEEN", "ADINA", "WYNONA", "TARSHA", "SHERON", "SHASTA", - "SHANITA", "SHANI", "SHANDRA", "RANDA", "PINKIE", "PARIS", "NELIDA", "MARILOU", "LYLA", "LAURENE", - "LACI", "JOI", "JANENE", "DOROTHA", "DANIELE", "DANI", "CAROLYNN", "CARLYN", "BERENICE", "AYESHA", - "ANNELIESE", "ALETHEA", "THERSA", "TAMIKO", "RUFINA", "OLIVA", "MOZELL", "MARYLYN", "MADISON", "KRISTIAN", - "KATHYRN", "KASANDRA", "KANDACE", "JANAE", "GABRIEL", "DOMENICA", "DEBBRA", "DANNIELLE", "CHUN", "BUFFY", - "BARBIE", "ARCELIA", "AJA", "ZENOBIA", "SHAREN", "SHAREE", "PATRICK", "PAGE", "MY", "LAVINIA", - "KUM", "KACIE", "JACKELINE", "HUONG", "FELISA", "EMELIA", "ELEANORA", "CYTHIA", "CRISTIN", "CLYDE", - "CLARIBEL", "CARON", "ANASTACIA", "ZULMA", "ZANDRA", "YOKO", "TENISHA", "SUSANN", "SHERILYN", "SHAY", - "SHAWANDA", "SABINE", "ROMANA", "MATHILDA", "LINSEY", "KEIKO", "JOANA", "ISELA", "GRETTA", "GEORGETTA", - "EUGENIE", "DUSTY", "DESIRAE", "DELORA", "CORAZON", "ANTONINA", "ANIKA", "WILLENE", "TRACEE", "TAMATHA", - "REGAN", "NICHELLE", "MICKIE", "MAEGAN", "LUANA", "LANITA", "KELSIE", "EDELMIRA", "BREE", "AFTON", - "TEODORA", "TAMIE", "SHENA", "MEG", "LINH", "KELI", "KACI", "DANYELLE", "BRITT", "ARLETTE", - "ALBERTINE", "ADELLE", "TIFFINY", "STORMY", "SIMONA", "NUMBERS", "NICOLASA", "NICHOL", "NIA", "NAKISHA", - "MEE", "MAIRA", "LOREEN", "KIZZY", "JOHNNY", "JAY", "FALLON", "CHRISTENE", "BOBBYE", "ANTHONY", - "YING", "VINCENZA", "TANJA", "RUBIE", "RONI", "QUEENIE", "MARGARETT", "KIMBERLI", "IRMGARD", "IDELL", - "HILMA", "EVELINA", "ESTA", "EMILEE", "DENNISE", "DANIA", "CARL", "CARIE", "ANTONIO", "WAI", - "SANG", "RISA", "RIKKI", "PARTICIA", "MUI", "MASAKO", "MARIO", "LUVENIA", "LOREE", "LONI", - "LIEN", "KEVIN", "GIGI", "FLORENCIA", "DORIAN", "DENITA", "DALLAS", "CHI", "BILLYE", "ALEXANDER", - "TOMIKA", "SHARITA", "RANA", "NIKOLE", "NEOMA", "MARGARITE", "MADALYN", "LUCINA", "LAILA", "KALI", - "JENETTE", "GABRIELE", "EVELYNE", "ELENORA", "CLEMENTINA", "ALEJANDRINA", "ZULEMA", "VIOLETTE", "VANNESSA", "THRESA", - "RETTA", "PIA", "PATIENCE", "NOELLA", "NICKIE", "JONELL", "DELTA", "CHUNG", "CHAYA", "CAMELIA", - "BETHEL", "ANYA", "ANDREW", "THANH", "SUZANN", "SPRING", "SHU", "MILA", "LILLA", "LAVERNA", - "KEESHA", "KATTIE", "GIA", "GEORGENE", "EVELINE", "ESTELL", "ELIZBETH", "VIVIENNE", "VALLIE", "TRUDIE", - "STEPHANE", "MICHEL", "MAGALY", "MADIE", "KENYETTA", "KARREN", "JANETTA", "HERMINE", "HARMONY", "DRUCILLA", - "DEBBI", "CELESTINA", "CANDIE", "BRITNI", "BECKIE", "AMINA", "ZITA", "YUN", "YOLANDE", "VIVIEN", - "VERNETTA", "TRUDI", "SOMMER", "PEARLE", "PATRINA", "OSSIE", "NICOLLE", "LOYCE", "LETTY", "LARISA", - "KATHARINA", "JOSELYN", "JONELLE", "JENELL", "IESHA", "HEIDE", "FLORINDA", "FLORENTINA", "FLO", "ELODIA", - "DORINE", "BRUNILDA", "BRIGID", "ASHLI", "ARDELLA", "TWANA", "THU", "TARAH", "SUNG", "SHEA", - "SHAVON", "SHANE", "SERINA", "RAYNA", "RAMONITA", "NGA", "MARGURITE", "LUCRECIA", "KOURTNEY", "KATI", - "JESUS", "JESENIA", "DIAMOND", "CRISTA", "AYANA", "ALICA", "ALIA", "VINNIE", "SUELLEN", "ROMELIA", - "RACHELL", "PIPER", "OLYMPIA", "MICHIKO", "KATHALEEN", "JOLIE", "JESSI", "JANESSA", "HANA", "HA", - "ELEASE", "CARLETTA", "BRITANY", "SHONA", "SALOME", "ROSAMOND", "REGENA", "RAINA", "NGOC", "NELIA", - "LOUVENIA", "LESIA", "LATRINA", "LATICIA", "LARHONDA", "JINA", "JACKI", "HOLLIS", "HOLLEY", "EMMY", - "DEEANN", "CORETTA", "ARNETTA", "VELVET", "THALIA", "SHANICE", "NETA", "MIKKI", "MICKI", "LONNA", - "LEANA", "LASHUNDA", "KILEY", "JOYE", "JACQULYN", "IGNACIA", "HYUN", "HIROKO", "HENRY", "HENRIETTE", - "ELAYNE", "DELINDA", "DARNELL", "DAHLIA", "COREEN", "CONSUELA", "CONCHITA", "CELINE", "BABETTE", "AYANNA", - "ANETTE", "ALBERTINA", "SKYE", "SHAWNEE", "SHANEKA", "QUIANA", "PAMELIA", "MIN", "MERRI", "MERLENE", - "MARGIT", "KIESHA", "KIERA", "KAYLENE", "JODEE", "JENISE", "ERLENE", "EMMIE", "ELSE", "DARYL", - "DALILA", "DAISEY", "CODY", "CASIE", "BELIA", "BABARA", "VERSIE", "VANESA", "SHELBA", "SHAWNDA", - "SAM", "NORMAN", "NIKIA", "NAOMA", "MARNA", "MARGERET", "MADALINE", "LAWANA", "KINDRA", "JUTTA", - "JAZMINE", "JANETT", "HANNELORE", "GLENDORA", "GERTRUD", "GARNETT", "FREEDA", "FREDERICA", "FLORANCE", "FLAVIA", - "DENNIS", "CARLINE", "BEVERLEE", "ANJANETTE", "VALDA", "TRINITY", "TAMALA", "STEVIE", "SHONNA", "SHA", - "SARINA", "ONEIDA", "MICAH", "MERILYN", "MARLEEN", "LURLINE", "LENNA", "KATHERIN", "JIN", "JENI", - "HAE", "GRACIA", "GLADY", "FARAH", "ERIC", "ENOLA", "EMA", "DOMINQUE", "DEVONA", "DELANA", - "CECILA", "CAPRICE", "ALYSHA", "ALI", "ALETHIA", "VENA", "THERESIA", "TAWNY", "SONG", "SHAKIRA", - "SAMARA", "SACHIKO", "RACHELE", "PAMELLA", "NICKY", "MARNI", "MARIEL", "MAREN", "MALISA", "LIGIA", - "LERA", "LATORIA", "LARAE", "KIMBER", "KATHERN", "KAREY", "JENNEFER", "JANETH", "HALINA", "FREDIA", - "DELISA", "DEBROAH", "CIERA", "CHIN", "ANGELIKA", "ANDREE", "ALTHA", "YEN", "VIVAN", "TERRESA", - "TANNA", "SUK", "SUDIE", "SOO", "SIGNE", "SALENA", "RONNI", "REBBECCA", "MYRTIE", "MCKENZIE", - "MALIKA", "MAIDA", "LOAN", "LEONARDA", "KAYLEIGH", "FRANCE", "ETHYL", "ELLYN", "DAYLE", "CAMMIE", - "BRITTNI", "BIRGIT", "AVELINA", "ASUNCION", "ARIANNA", "AKIKO", "VENICE", "TYESHA", "TONIE", "TIESHA", - "TAKISHA", "STEFFANIE", "SINDY", "SANTANA", "MEGHANN", "MANDA", "MACIE", "LADY", "KELLYE", "KELLEE", - "JOSLYN", "JASON", "INGER", "INDIRA", "GLINDA", "GLENNIS", "FERNANDA", "FAUSTINA", "ENEIDA", "ELICIA", - "DOT", "DIGNA", "DELL", "ARLETTA", "ANDRE", "WILLIA", "TAMMARA", "TABETHA", "SHERRELL", "SARI", - "REFUGIO", "REBBECA", "PAULETTA", "NIEVES", "NATOSHA", "NAKITA", "MAMMIE", "KENISHA", "KAZUKO", "KASSIE", - "GARY", "EARLEAN", "DAPHINE", "CORLISS", "CLOTILDE", "CAROLYNE", "BERNETTA", "AUGUSTINA", "AUDREA", "ANNIS", - "ANNABELL", "YAN", "TENNILLE", "TAMICA", "SELENE", "SEAN", "ROSANA", "REGENIA", "QIANA", "MARKITA", - "MACY", "LEEANNE", "LAURINE", "KYM", "JESSENIA", "JANITA", "GEORGINE", "GENIE", "EMIKO", "ELVIE", - "DEANDRA", "DAGMAR", "CORIE", "COLLEN", "CHERISH", "ROMAINE", "PORSHA", "PEARLENE", "MICHELINE", "MERNA", - "MARGORIE", "MARGARETTA", "LORE", "KENNETH", "JENINE", "HERMINA", "FREDERICKA", "ELKE", "DRUSILLA", "DORATHY", - "DIONE", "DESIRE", "CELENA", "BRIGIDA", "ANGELES", "ALLEGRA", "THEO", "TAMEKIA", "SYNTHIA", "STEPHEN", - "SOOK", "SLYVIA", "ROSANN", "REATHA", "RAYE", "MARQUETTA", "MARGART", "LING", "LAYLA", "KYMBERLY", - "KIANA", "KAYLEEN", "KATLYN", "KARMEN", "JOELLA", "IRINA", "EMELDA", "ELENI", "DETRA", "CLEMMIE", - "CHERYLL", "CHANTELL", "CATHEY", "ARNITA", "ARLA", "ANGLE", "ANGELIC", "ALYSE", "ZOFIA", "THOMASINE", - "TENNIE", "SON", "SHERLY", "SHERLEY", "SHARYL", "REMEDIOS", "PETRINA", "NICKOLE", "MYUNG", "MYRLE", - "MOZELLA", "LOUANNE", "LISHA", "LATIA", "LANE", "KRYSTA", "JULIENNE", "JOEL", "JEANENE", "JACQUALINE", - "ISAURA", "GWENDA", "EARLEEN", "DONALD", "CLEOPATRA", "CARLIE", "AUDIE", "ANTONIETTA", "ALISE", "ALEX", - "VERDELL", "VAL", "TYLER", "TOMOKO", "THAO", "TALISHA", "STEVEN", "SO", "SHEMIKA", "SHAUN", - "SCARLET", "SAVANNA", "SANTINA", "ROSIA", "RAEANN", "ODILIA", "NANA", "MINNA", "MAGAN", "LYNELLE", - "LE", "KARMA", "JOEANN", "IVANA", "INELL", "ILANA", "HYE", "HONEY", "HEE", "GUDRUN", - "FRANK", "DREAMA", "CRISSY", "CHANTE", "CARMELINA", "ARVILLA", "ARTHUR", "ANNAMAE", "ALVERA", "ALEIDA", - "AARON", "YEE", "YANIRA", "VANDA", "TIANNA", "TAM", "STEFANIA", "SHIRA", "PERRY", "NICOL", - "NANCIE", "MONSERRATE", "MINH", "MELYNDA", "MELANY", "MATTHEW", "LOVELLA", "LAURE", "KIRBY", "KACY", - "JACQUELYNN", "HYON", "GERTHA", "FRANCISCO", "ELIANA", "CHRISTENA", "CHRISTEEN", "CHARISE", "CATERINA", "CARLEY", - "CANDYCE", "ARLENA", "AMMIE", "YANG", "WILLETTE", "VANITA", "TUYET", "TINY", "SYREETA", "SILVA", - "SCOTT", "RONALD", "PENNEY", "NYLA", "MICHAL", "MAURICE", "MARYAM", "MARYA", "MAGEN", "LUDIE", - "LOMA", "LIVIA", "LANELL", "KIMBERLIE", "JULEE", "DONETTA", "DIEDRA", "DENISHA", "DEANE", "DAWNE", - "CLARINE", "CHERRYL", "BRONWYN", "BRANDON", "ALLA", "VALERY", "TONDA", "SUEANN", "SORAYA", "SHOSHANA", - "SHELA", "SHARLEEN", "SHANELLE", "NERISSA", "MICHEAL", "MERIDITH", "MELLIE", "MAYE", "MAPLE", "MAGARET", - "LUIS", "LILI", "LEONILA", "LEONIE", "LEEANNA", "LAVONIA", "LAVERA", "KRISTEL", "KATHEY", "KATHE", - "JUSTIN", "JULIAN", "JIMMY", "JANN", "ILDA", "HILDRED", "HILDEGARDE", "GENIA", "FUMIKO", "EVELIN", - "ERMELINDA", "ELLY", "DUNG", "DOLORIS", "DIONNA", "DANAE", "BERNEICE", "ANNICE", "ALIX", "VERENA", - "VERDIE", "TRISTAN", "SHAWNNA", "SHAWANA", "SHAUNNA", "ROZELLA", "RANDEE", "RANAE", "MILAGRO", "LYNELL", - "LUISE", "LOUIE", "LOIDA", "LISBETH", "KARLEEN", "JUNITA", "JONA", "ISIS", "HYACINTH", "HEDY", - "GWENN", "ETHELENE", "ERLINE", "EDWARD", "DONYA", "DOMONIQUE", "DELICIA", "DANNETTE", "CICELY", "BRANDA", - "BLYTHE", "BETHANN", "ASHLYN", "ANNALEE", "ALLINE", "YUKO", "VELLA", "TRANG", "TOWANDA", "TESHA", - "SHERLYN", "NARCISA", "MIGUELINA", "MERI", "MAYBELL", "MARLANA", "MARGUERITA", "MADLYN", "LUNA", "LORY", - "LORIANN", "LIBERTY", "LEONORE", "LEIGHANN", "LAURICE", "LATESHA", "LARONDA", "KATRICE", "KASIE", "KARL", - "KALEY", "JADWIGA", "GLENNIE", "GEARLDINE", "FRANCINA", "EPIFANIA", "DYAN", "DORIE", "DIEDRE", "DENESE", - "DEMETRICE", "DELENA", "DARBY", "CRISTIE", "CLEORA", "CATARINA", "CARISA", "BERNIE", "BARBERA", "ALMETA", - "TRULA", "TEREASA", "SOLANGE", "SHEILAH", "SHAVONNE", "SANORA", "ROCHELL", "MATHILDE", "MARGARETA", "MAIA", - "LYNSEY", "LAWANNA", "LAUNA", "KENA", "KEENA", "KATIA", "JAMEY", "GLYNDA", "GAYLENE", "ELVINA", - "ELANOR", "DANUTA", "DANIKA", "CRISTEN", "CORDIE", "COLETTA", "CLARITA", "CARMON", "BRYNN", "AZUCENA", - "AUNDREA", "ANGELE", "YI", "WALTER", "VERLIE", "VERLENE", "TAMESHA", "SILVANA", "SEBRINA", "SAMIRA", - "REDA", "RAYLENE", "PENNI", "PANDORA", "NORAH", "NOMA", "MIREILLE", "MELISSIA", "MARYALICE", "LARAINE", - "KIMBERY", "KARYL", "KARINE", "KAM", "JOLANDA", "JOHANA", "JESUSA", "JALEESA", "JAE", "JACQUELYNE", - "IRISH", "ILUMINADA", "HILARIA", "HANH", "GENNIE", "FRANCIE", "FLORETTA", "EXIE", "EDDA", "DREMA", - "DELPHA", "BEV", "BARBAR", "ASSUNTA", "ARDELL", "ANNALISA", "ALISIA", "YUKIKO", "YOLANDO", "WONDA", - "WEI", "WALTRAUD", "VETA", "TEQUILA", "TEMEKA", "TAMEIKA", "SHIRLEEN", "SHENITA", "PIEDAD", "OZELLA", - "MIRTHA", "MARILU", "KIMIKO", "JULIANE", "JENICE", "JEN", "JANAY", "JACQUILINE", "HILDE", "FE", - "FAE", "EVAN", "EUGENE", "ELOIS", "ECHO", "DEVORAH", "CHAU", "BRINDA", "BETSEY", "ARMINDA", - "ARACELIS", "APRYL", "ANNETT", "ALISHIA", "VEOLA", "USHA", "TOSHIKO", "THEOLA", "TASHIA", "TALITHA", - "SHERY", "RUDY", "RENETTA", "REIKO", "RASHEEDA", "OMEGA", "OBDULIA", "MIKA", "MELAINE", "MEGGAN", - "MARTIN", "MARLEN", "MARGET", "MARCELINE", "MANA", "MAGDALEN", "LIBRADA", "LEZLIE", "LEXIE", "LATASHIA", - "LASANDRA", "KELLE", "ISIDRA", "ISA", "INOCENCIA", "GWYN", "FRANCOISE", "ERMINIA", "ERINN", "DIMPLE", - "DEVORA", "CRISELDA", "ARMANDA", "ARIE", "ARIANE", "ANGELO", "ANGELENA", "ALLEN", "ALIZA", "ADRIENE", - "ADALINE", "XOCHITL", "TWANNA", "TRAN", "TOMIKO", "TAMISHA", "TAISHA", "SUSY", "SIU", "RUTHA", - "ROXY", "RHONA", "RAYMOND", "OTHA", "NORIKO", "NATASHIA", "MERRIE", "MELVIN", "MARINDA", "MARIKO", - "MARGERT", "LORIS", "LIZZETTE", "LEISHA", "KAILA", "KA", "JOANNIE", "JERRICA", "JENE", "JANNET", - "JANEE", "JACINDA", "HERTA", "ELENORE", "DORETTA", "DELAINE", "DANIELL", "CLAUDIE", "CHINA", "BRITTA", - "APOLONIA", "AMBERLY", "ALEASE", "YURI", "YUK", "WEN", "WANETA", "UTE", "TOMI", "SHARRI", - "SANDIE", "ROSELLE", "REYNALDA", "RAGUEL", "PHYLICIA", "PATRIA", "OLIMPIA", "ODELIA", "MITZIE", "MITCHELL", - "MISS", "MINDA", "MIGNON", "MICA", "MENDY", "MARIVEL", "MAILE", "LYNETTA", "LAVETTE", "LAURYN", - "LATRISHA", "LAKIESHA", "KIERSTEN", "KARY", "JOSPHINE", "JOLYN", "JETTA", "JANISE", "JACQUIE", "IVELISSE", - "GLYNIS", "GIANNA", "GAYNELLE", "EMERALD", "DEMETRIUS", "DANYELL", "DANILLE", "DACIA", "CORALEE", "CHER", - "CEOLA", "BRETT", "BELL", "ARIANNE", "ALESHIA", "YUNG", "WILLIEMAE", "TROY", "TRINH", "THORA", - "TAI", "SVETLANA", "SHERIKA", "SHEMEKA", "SHAUNDA", "ROSELINE", "RICKI", "MELDA", "MALLIE", "LAVONNA", - "LATINA", "LARRY", "LAQUANDA", "LALA", "LACHELLE", "KLARA", "KANDIS", "JOHNA", "JEANMARIE", "JAYE", - "HANG", "GRAYCE", "GERTUDE", "EMERITA", "EBONIE", "CLORINDA", "CHING", "CHERY", "CAROLA", "BREANN", - "BLOSSOM", "BERNARDINE", "BECKI", "ARLETHA", "ARGELIA", "ARA", "ALITA", "YULANDA", "YON", "YESSENIA", - "TOBI", "TASIA", "SYLVIE", "SHIRL", "SHIRELY", "SHERIDAN", "SHELLA", "SHANTELLE", "SACHA", "ROYCE", - "REBECKA", "REAGAN", "PROVIDENCIA", "PAULENE", "MISHA", "MIKI", "MARLINE", "MARICA", "LORITA", "LATOYIA", - "LASONYA", "KERSTIN", "KENDA", "KEITHA", "KATHRIN", "JAYMIE", "JACK", "GRICELDA", "GINETTE", "ERYN", - "ELINA", "ELFRIEDA", "DANYEL", "CHEREE", "CHANELLE", "BARRIE", "AVERY", "AURORE", "ANNAMARIA", "ALLEEN", - "AILENE", "AIDE", "YASMINE", "VASHTI", "VALENTINE", "TREASA", "TORY", "TIFFANEY", "SHERYLL", "SHARIE", - "SHANAE", "SAU", "RAISA", "PA", "NEDA", "MITSUKO", "MIRELLA", "MILDA", "MARYANNA", "MARAGRET", - "MABELLE", "LUETTA", "LORINA", "LETISHA", "LATARSHA", "LANELLE", "LAJUANA", "KRISSY", "KARLY", "KARENA", - "JON", "JESSIKA", "JERICA", "JEANELLE", "JANUARY", "JALISA", "JACELYN", "IZOLA", "IVEY", "GREGORY", - "EUNA", "ETHA", "DREW", "DOMITILA", "DOMINICA", "DAINA", "CREOLA", "CARLI", "CAMIE", "BUNNY", - "BRITTNY", "ASHANTI", "ANISHA", "ALEEN", "ADAH", "YASUKO", "WINTER", "VIKI", "VALRIE", "TONA", - "TINISHA", "THI", "TERISA", "TATUM", "TANEKA", "SIMONNE", "SHALANDA", "SERITA", "RESSIE", "REFUGIA", - "PAZ", "OLENE", "NA", "MERRILL", "MARGHERITA", "MANDIE", "MAN", "MAIRE", "LYNDIA", "LUCI", - "LORRIANE", "LORETA", "LEONIA", "LAVONA", "LASHAWNDA", "LAKIA", "KYOKO", "KRYSTINA", "KRYSTEN", "KENIA", - "KELSI", "JUDE", "JEANICE", "ISOBEL", "GEORGIANN", "GENNY", "FELICIDAD", "EILENE", "DEON", "DELOISE", - "DEEDEE", "DANNIE", "CONCEPTION", "CLORA", "CHERILYN", "CHANG", "CALANDRA", "BERRY", "ARMANDINA", "ANISA", - "ULA", "TIMOTHY", "TIERA", "THERESSA", "STEPHANIA", "SIMA", "SHYLA", "SHONTA", "SHERA", "SHAQUITA", - "SHALA", "SAMMY", "ROSSANA", "NOHEMI", "NERY", "MORIAH", "MELITA", "MELIDA", "MELANI", "MARYLYNN", - "MARISHA", "MARIETTE", "MALORIE", "MADELENE", "LUDIVINA", "LORIA", "LORETTE", "LORALEE", "LIANNE", "LEON", - "LAVENIA", "LAURINDA", "LASHON", "KIT", "KIMI", "KEILA", "KATELYNN", "KAI", "JONE", "JOANE", - "JI", "JAYNA", "JANELLA", "JA", "HUE", "HERTHA", "FRANCENE", "ELINORE", "DESPINA", "DELSIE", - "DEEDRA", "CLEMENCIA", "CARRY", "CAROLIN", "CARLOS", "BULAH", "BRITTANIE", "BOK", "BLONDELL", "BIBI", - "BEAULAH", "BEATA", "ANNITA", "AGRIPINA", "VIRGEN", "VALENE", "UN", "TWANDA", "TOMMYE", "TOI", - "TARRA", "TARI", "TAMMERA", "SHAKIA", "SADYE", "RUTHANNE", "ROCHEL", "RIVKA", "PURA", "NENITA", - "NATISHA", "MING", "MERRILEE", "MELODEE", "MARVIS", "LUCILLA", "LEENA", "LAVETA", "LARITA", "LANIE", - "KEREN", "ILEEN", "GEORGEANN", "GENNA", "GENESIS", "FRIDA", "EWA", "EUFEMIA", "EMELY", "ELA", - "EDYTH", "DEONNA", "DEADRA", "DARLENA", "CHANELL", "CHAN", "CATHERN", "CASSONDRA", "CASSAUNDRA", "BERNARDA", - "BERNA", "ARLINDA", "ANAMARIA", "ALBERT", "WESLEY", "VERTIE", "VALERI", "TORRI", "TATYANA", "STASIA", - "SHERISE", "SHERILL", "SEASON", "SCOTTIE", "SANDA", "RUTHE", "ROSY", "ROBERTO", "ROBBI", "RANEE", - "QUYEN", "PEARLY", "PALMIRA", "ONITA", "NISHA", "NIESHA", "NIDA", "NEVADA", "NAM", "MERLYN", - "MAYOLA", "MARYLOUISE", "MARYLAND", "MARX", "MARTH", "MARGENE", "MADELAINE", "LONDA", "LEONTINE", "LEOMA", - "LEIA", "LAWRENCE", "LAURALEE", "LANORA", "LAKITA", "KIYOKO", "KETURAH", "KATELIN", "KAREEN", "JONIE", - "JOHNETTE", "JENEE", "JEANETT", "IZETTA", "HIEDI", "HEIKE", "HASSIE", "HAROLD", "GIUSEPPINA", "GEORGANN", - "FIDELA", "FERNANDE", "ELWANDA", "ELLAMAE", "ELIZ", "DUSTI", "DOTTY", "CYNDY", "CORALIE", "CELESTA", - "ARGENTINA", "ALVERTA", "XENIA", "WAVA", "VANETTA", "TORRIE", "TASHINA", "TANDY", "TAMBRA", "TAMA", - "STEPANIE", "SHILA", "SHAUNTA", "SHARAN", "SHANIQUA", "SHAE", "SETSUKO", "SERAFINA", "SANDEE", "ROSAMARIA", - "PRISCILA", "OLINDA", "NADENE", "MUOI", "MICHELINA", "MERCEDEZ", "MARYROSE", "MARIN", "MARCENE", "MAO", - "MAGALI", "MAFALDA", "LOGAN", "LINN", "LANNIE", "KAYCE", "KAROLINE", "KAMILAH", "KAMALA", "JUSTA", - "JOLINE", "JENNINE", "JACQUETTA", "IRAIDA", "GERALD", "GEORGEANNA", "FRANCHESCA", "FAIRY", "EMELINE", "ELANE", - "EHTEL", "EARLIE", "DULCIE", "DALENE", "CRIS", "CLASSIE", "CHERE", "CHARIS", "CAROYLN", "CARMINA", - "CARITA", "BRIAN", "BETHANIE", "AYAKO", "ARICA", "AN", "ALYSA", "ALESSANDRA", "AKILAH", "ADRIEN", - "ZETTA", "YOULANDA", "YELENA", "YAHAIRA", "XUAN", "WENDOLYN", "VICTOR", "TIJUANA", "TERRELL", "TERINA", - "TERESIA", "SUZI", "SUNDAY", "SHERELL", "SHAVONDA", "SHAUNTE", "SHARDA", "SHAKITA", "SENA", "RYANN", - "RUBI", "RIVA", "REGINIA", "REA", "RACHAL", "PARTHENIA", "PAMULA", "MONNIE", "MONET", "MICHAELE", - "MELIA", "MARINE", "MALKA", "MAISHA", "LISANDRA", "LEO", "LEKISHA", "LEAN", "LAURENCE", "LAKENDRA", - "KRYSTIN", "KORTNEY", "KIZZIE", "KITTIE", "KERA", "KENDAL", "KEMBERLY", "KANISHA", "JULENE", "JULE", - "JOSHUA", "JOHANNE", "JEFFREY", "JAMEE", "HAN", "HALLEY", "GIDGET", "GALINA", "FREDRICKA", "FLETA", - "FATIMAH", "EUSEBIA", "ELZA", "ELEONORE", "DORTHEY", "DORIA", "DONELLA", "DINORAH", "DELORSE", "CLARETHA", - "CHRISTINIA", "CHARLYN", "BONG", "BELKIS", "AZZIE", "ANDERA", "AIKO", "ADENA", "YER", "YAJAIRA", - "WAN", "VANIA", "ULRIKE", "TOSHIA", "TIFANY", "STEFANY", "SHIZUE", "SHENIKA", "SHAWANNA", "SHAROLYN", - "SHARILYN", "SHAQUANA", "SHANTAY", "SEE", "ROZANNE", "ROSELEE", "RICKIE", "REMONA", "REANNA", "RAELENE", - "QUINN", "PHUNG", "PETRONILA", "NATACHA", "NANCEY", "MYRL", "MIYOKO", "MIESHA", "MERIDETH", "MARVELLA", - "MARQUITTA", "MARHTA", "MARCHELLE", "LIZETH", "LIBBIE", "LAHOMA", "LADAWN", "KINA", "KATHELEEN", "KATHARYN", - "KARISA", "KALEIGH", "JUNIE", "JULIEANN", "JOHNSIE", "JANEAN", "JAIMEE", "JACKQUELINE", "HISAKO", "HERMA", - "HELAINE", "GWYNETH", "GLENN", "GITA", "EUSTOLIA", "EMELINA", "ELIN", "EDRIS", "DONNETTE", "DONNETTA", - "DIERDRE", "DENAE", "DARCEL", "CLAUDE", "CLARISA", "CINDERELLA", "CHIA", "CHARLESETTA", "CHARITA", "CELSA", - "CASSY", "CASSI", "CARLEE", "BRUNA", "BRITTANEY", "BRANDE", "BILLI", "BAO", "ANTONETTA", "ANGLA", - "ANGELYN", "ANALISA", "ALANE", "WENONA", "WENDIE", "VERONIQUE", "VANNESA", "TOBIE", "TEMPIE", "SUMIKO", - "SULEMA", "SPARKLE", "SOMER", "SHEBA", "SHAYNE", "SHARICE", "SHANEL", "SHALON", "SAGE", "ROY", - "ROSIO", "ROSELIA", "RENAY", "REMA", "REENA", "PORSCHE", "PING", "PEG", "OZIE", "ORETHA", - "ORALEE", "ODA", "NU", "NGAN", "NAKESHA", "MILLY", "MARYBELLE", "MARLIN", "MARIS", "MARGRETT", - "MARAGARET", "MANIE", "LURLENE", "LILLIA", "LIESELOTTE", "LAVELLE", "LASHAUNDA", "LAKEESHA", "KEITH", "KAYCEE", - "KALYN", "JOYA", "JOETTE", "JENAE", "JANIECE", "ILLA", "GRISEL", "GLAYDS", "GENEVIE", "GALA", - "FREDDA", "FRED", "ELMER", "ELEONOR", "DEBERA", "DEANDREA", "DAN", "CORRINNE", "CORDIA", "CONTESSA", - "COLENE", "CLEOTILDE", "CHARLOTT", "CHANTAY", "CECILLE", "BEATRIS", "AZALEE", "ARLEAN", "ARDATH", "ANJELICA", - "ANJA", "ALFREDIA", "ALEISHA", "ADAM", "ZADA", "YUONNE", "XIAO", "WILLODEAN", "WHITLEY", "VENNIE", - "VANNA", "TYISHA", "TOVA", "TORIE", "TONISHA", "TILDA", "TIEN", "TEMPLE", "SIRENA", "SHERRIL", - "SHANTI", "SHAN", "SENAIDA", "SAMELLA", "ROBBYN", "RENDA", "REITA", "PHEBE", "PAULITA", "NOBUKO", - "NGUYET", "NEOMI", "MOON", "MIKAELA", "MELANIA", "MAXIMINA", "MARG", "MAISIE", "LYNNA", "LILLI", - "LAYNE", "LASHAUN", "LAKENYA", "LAEL", "KIRSTIE", "KATHLINE", "KASHA", "KARLYN", "KARIMA", "JOVAN", - "JOSEFINE", "JENNELL", "JACQUI", "JACKELYN", "HYO", "HIEN", "GRAZYNA", "FLORRIE", "FLORIA", "ELEONORA", - "DWANA", "DORLA", "DONG", "DELMY", "DEJA", "DEDE", "DANN", "CRYSTA", "CLELIA", "CLARIS", - "CLARENCE", "CHIEKO", "CHERLYN", "CHERELLE", "CHARMAIN", "CHARA", "CAMMY", "BEE", "ARNETTE", "ARDELLE", - "ANNIKA", "AMIEE", "AMEE", "ALLENA", "YVONE", "YUKI", "YOSHIE", "YEVETTE", "YAEL", "WILLETTA", - "VONCILE", "VENETTA", "TULA", "TONETTE", "TIMIKA", "TEMIKA", "TELMA", "TEISHA", "TAREN", "TA", - "STACEE", "SHIN", "SHAWNTA", "SATURNINA", "RICARDA", "POK", "PASTY", "ONIE", "NUBIA", "MORA", - "MIKE", "MARIELLE", "MARIELLA", "MARIANELA", "MARDELL", "MANY", "LUANNA", "LOISE", "LISABETH", "LINDSY", - "LILLIANA", "LILLIAM", "LELAH", "LEIGHA", "LEANORA", "LANG", "KRISTEEN", "KHALILAH", "KEELEY", "KANDRA", - "JUNKO", "JOAQUINA", "JERLENE", "JANI", "JAMIKA", "JAME", "HSIU", "HERMILA", "GOLDEN", "GENEVIVE", - "EVIA", "EUGENA", "EMMALINE", "ELFREDA", "ELENE", "DONETTE", "DELCIE", "DEEANNA", "DARCEY", "CUC", - "CLARINDA", "CIRA", "CHAE", "CELINDA", "CATHERYN", "CATHERIN", "CASIMIRA", "CARMELIA", "CAMELLIA", "BREANA", - "BOBETTE", "BERNARDINA", "BEBE", "BASILIA", "ARLYNE", "AMAL", "ALAYNA", "ZONIA", "ZENIA", "YURIKO", - "YAEKO", "WYNELL", "WILLOW", "WILLENA", "VERNIA", "TU", "TRAVIS", "TORA", "TERRILYN", "TERICA", - "TENESHA", "TAWNA", "TAJUANA", "TAINA", "STEPHNIE", "SONA", "SOL", "SINA", "SHONDRA", "SHIZUKO", - "SHERLENE", "SHERICE", "SHARIKA", "ROSSIE", "ROSENA", "RORY", "RIMA", "RIA", "RHEBA", "RENNA", - "PETER", "NATALYA", "NANCEE", "MELODI", "MEDA", "MAXIMA", "MATHA", "MARKETTA", "MARICRUZ", "MARCELENE", - "MALVINA", "LUBA", "LOUETTA", "LEIDA", "LECIA", "LAURAN", "LASHAWNA", "LAINE", "KHADIJAH", "KATERINE", - "KASI", "KALLIE", "JULIETTA", "JESUSITA", "JESTINE", "JESSIA", "JEREMY", "JEFFIE", "JANYCE", "ISADORA", - "GEORGIANNE", "FIDELIA", "EVITA", "EURA", "EULAH", "ESTEFANA", "ELSY", "ELIZABET", "ELADIA", "DODIE", - "DION", "DIA", "DENISSE", "DELORAS", "DELILA", "DAYSI", "DAKOTA", "CURTIS", "CRYSTLE", "CONCHA", - "COLBY", "CLARETTA", "CHU", "CHRISTIA", "CHARLSIE", "CHARLENA", "CARYLON", "BETTYANN", "ASLEY", "ASHLEA", - "AMIRA", "AI", "AGUEDA", "AGNUS", "YUETTE", "VINITA", "VICTORINA", "TYNISHA", "TREENA", "TOCCARA", - "TISH", "THOMASENA", "TEGAN", "SOILA", "SHILOH", "SHENNA", "SHARMAINE", "SHANTAE", "SHANDI", "SEPTEMBER", - "SARAN", "SARAI", "SANA", "SAMUEL", "SALLEY", "ROSETTE", "ROLANDE", "REGINE", "OTELIA", "OSCAR", - "OLEVIA", "NICHOLLE", "NECOLE", "NAIDA", "MYRTA", "MYESHA", "MITSUE", "MINTA", "MERTIE", "MARGY", - "MAHALIA", "MADALENE", "LOVE", "LOURA", "LOREAN", "LEWIS", "LESHA", "LEONIDA", "LENITA", "LAVONE", - "LASHELL", "LASHANDRA", "LAMONICA", "KIMBRA", "KATHERINA", "KARRY", "KANESHA", "JULIO", "JONG", "JENEVA", - "JAQUELYN", "HWA", "GILMA", "GHISLAINE", "GERTRUDIS", "FRANSISCA", "FERMINA", "ETTIE", "ETSUKO", "ELLIS", - "ELLAN", "ELIDIA", "EDRA", "DORETHEA", "DOREATHA", "DENYSE", "DENNY", "DEETTA", "DAINE", "CYRSTAL", - "CORRIN", "CAYLA", "CARLITA", "CAMILA", "BURMA", "BULA", "BUENA", "BLAKE", "BARABARA", "AVRIL", - "AUSTIN", "ALAINE", "ZANA", "WILHEMINA", "WANETTA", "VIRGIL", "VI", "VERONIKA", "VERNON", "VERLINE", - "VASILIKI", "TONITA", "TISA", "TEOFILA", "TAYNA", "TAUNYA", "TANDRA", "TAKAKO", "SUNNI", "SUANNE", - "SIXTA", "SHARELL", "SEEMA", "RUSSELL", "ROSENDA", "ROBENA", "RAYMONDE", "PEI", "PAMILA", "OZELL", - "NEIDA", "NEELY", "MISTIE", "MICHA", "MERISSA", "MAURITA", "MARYLN", "MARYETTA", "MARSHALL", "MARCELL", - "MALENA", "MAKEDA", "MADDIE", "LOVETTA", "LOURIE", "LORRINE", "LORILEE", "LESTER", "LAURENA", "LASHAY", - "LARRAINE", "LAREE", "LACRESHA", "KRISTLE", "KRISHNA", "KEVA", "KEIRA", "KAROLE", "JOIE", "JINNY", - "JEANNETTA", "JAMA", "HEIDY", "GILBERTE", "GEMA", "FAVIOLA", "EVELYNN", "ENDA", "ELLI", "ELLENA", - "DIVINA", "DAGNY", "COLLENE", "CODI", "CINDIE", "CHASSIDY", "CHASIDY", "CATRICE", "CATHERINA", "CASSEY", - "CAROLL", "CARLENA", "CANDRA", "CALISTA", "BRYANNA", "BRITTENY", "BEULA", "BARI", "AUDRIE", "AUDRIA", - "ARDELIA", "ANNELLE", "ANGILA", "ALONA", "ALLYN", "DOUGLAS", "ROGER", "JONATHAN", "RALPH", "NICHOLAS", - "BENJAMIN", "BRUCE", "HARRY", "WAYNE", "STEVE", "HOWARD", "ERNEST", "PHILLIP", "TODD", "CRAIG", - "ALAN", "PHILIP", "EARL", "DANNY", "BRYAN", "STANLEY", "LEONARD", "NATHAN", "MANUEL", "RODNEY", - "MARVIN", "VINCENT", "JEFFERY", "JEFF", "CHAD", "JACOB", "ALFRED", "BRADLEY", "HERBERT", "FREDERICK", - "EDWIN", "DON", "RICKY", "RANDALL", "BARRY", "BERNARD", "LEROY", "MARCUS", "THEODORE", "CLIFFORD", - "MIGUEL", "JIM", "TOM", "CALVIN", "BILL", "LLOYD", "DEREK", "WARREN", "DARRELL", "JEROME", - "FLOYD", "ALVIN", "TIM", "GORDON", "GREG", "JORGE", "DUSTIN", "PEDRO", "DERRICK", "ZACHARY", - "HERMAN", "GLEN", "HECTOR", "RICARDO", "RICK", "BRENT", "RAMON", "GILBERT", "MARC", "REGINALD", - "RUBEN", "NATHANIEL", "RAFAEL", "EDGAR", "MILTON", "RAUL", "BEN", "CHESTER", "DUANE", "FRANKLIN", - "BRAD", "RON", "ROLAND", "ARNOLD", "HARVEY", "JARED", "ERIK", "DARRYL", "NEIL", "JAVIER", - "FERNANDO", "CLINTON", "TED", "MATHEW", "TYRONE", "DARREN", "LANCE", "KURT", "ALLAN", "NELSON", - "GUY", "CLAYTON", "HUGH", "MAX", "DWAYNE", "DWIGHT", "ARMANDO", "FELIX", "EVERETT", "IAN", - "WALLACE", "KEN", "BOB", "ALFREDO", "ALBERTO", "DAVE", "IVAN", "BYRON", "ISAAC", "MORRIS", - "CLIFTON", "WILLARD", "ROSS", "ANDY", "SALVADOR", "KIRK", "SERGIO", "SETH", "KENT", "TERRANCE", - "EDUARDO", "TERRENCE", "ENRIQUE", "WADE", "STUART", "FREDRICK", "ARTURO", "ALEJANDRO", "NICK", "LUTHER", - "WENDELL", "JEREMIAH", "JULIUS", "OTIS", "TREVOR", "OLIVER", "LUKE", "HOMER", "GERARD", "DOUG", - "KENNY", "HUBERT", "LYLE", "MATT", "ALFONSO", "ORLANDO", "REX", "CARLTON", "ERNESTO", "NEAL", - "PABLO", "LORENZO", "OMAR", "WILBUR", "GRANT", "HORACE", "RODERICK", "ABRAHAM", "WILLIS", "RICKEY", - "ANDRES", "CESAR", "JOHNATHAN", "MALCOLM", "RUDOLPH", "DAMON", "KELVIN", "PRESTON", "ALTON", "ARCHIE", - "MARCO", "WM", "PETE", "RANDOLPH", "GARRY", "GEOFFREY", "JONATHON", "FELIPE", "GERARDO", "ED", - "DOMINIC", "DELBERT", "COLIN", "GUILLERMO", "EARNEST", "LUCAS", "BENNY", "SPENCER", "RODOLFO", "MYRON", - "EDMUND", "GARRETT", "SALVATORE", "CEDRIC", "LOWELL", "GREGG", "SHERMAN", "WILSON", "SYLVESTER", "ROOSEVELT", - "ISRAEL", "JERMAINE", "FORREST", "WILBERT", "LELAND", "SIMON", "CLARK", "IRVING", "BRYANT", "OWEN", - "RUFUS", "WOODROW", "KRISTOPHER", "MACK", "LEVI", "MARCOS", "GUSTAVO", "JAKE", "LIONEL", "GILBERTO", - "CLINT", "NICOLAS", "ISMAEL", "ORVILLE", "ERVIN", "DEWEY", "AL", "WILFRED", "JOSH", "HUGO", - "IGNACIO", "CALEB", "TOMAS", "SHELDON", "ERICK", "STEWART", "DOYLE", "DARREL", "ROGELIO", "TERENCE", - "SANTIAGO", "ALONZO", "ELIAS", "BERT", "ELBERT", "RAMIRO", "CONRAD", "NOAH", "GRADY", "PHIL", - "CORNELIUS", "LAMAR", "ROLANDO", "CLAY", "PERCY", "DEXTER", "BRADFORD", "DARIN", "AMOS", "MOSES", - "IRVIN", "SAUL", "ROMAN", "RANDAL", "TIMMY", "DARRIN", "WINSTON", "BRENDAN", "ABEL", "DOMINICK", - "BOYD", "EMILIO", "ELIJAH", "DOMINGO", "EMMETT", "MARLON", "EMANUEL", "JERALD", "EDMOND", "EMIL", - "DEWAYNE", "WILL", "OTTO", "TEDDY", "REYNALDO", "BRET", "JESS", "TRENT", "HUMBERTO", "EMMANUEL", - "STEPHAN", "VICENTE", "LAMONT", "GARLAND", "MILES", "EFRAIN", "HEATH", "RODGER", "HARLEY", "ETHAN", - "ELDON", "ROCKY", "PIERRE", "JUNIOR", "FREDDY", "ELI", "BRYCE", "ANTOINE", "STERLING", "CHASE", - "GROVER", "ELTON", "CLEVELAND", "DYLAN", "CHUCK", "DAMIAN", "REUBEN", "STAN", "AUGUST", "LEONARDO", - "JASPER", "RUSSEL", "ERWIN", "BENITO", "HANS", "MONTE", "BLAINE", "ERNIE", "CURT", "QUENTIN", - "AGUSTIN", "MURRAY", "JAMAL", "ADOLFO", "HARRISON", "TYSON", "BURTON", "BRADY", "ELLIOTT", "WILFREDO", - "BART", "JARROD", "VANCE", "DENIS", "DAMIEN", "JOAQUIN", "HARLAN", "DESMOND", "ELLIOT", "DARWIN", - "GREGORIO", "BUDDY", "XAVIER", "KERMIT", "ROSCOE", "ESTEBAN", "ANTON", "SOLOMON", "SCOTTY", "NORBERT", - "ELVIN", "WILLIAMS", "NOLAN", "ROD", "QUINTON", "HAL", "BRAIN", "ROB", "ELWOOD", "KENDRICK", - "DARIUS", "MOISES", "FIDEL", "THADDEUS", "CLIFF", "MARCEL", "JACKSON", "RAPHAEL", "BRYON", "ARMAND", - "ALVARO", "JEFFRY", "DANE", "JOESPH", "THURMAN", "NED", "RUSTY", "MONTY", "FABIAN", "REGGIE", - "MASON", "GRAHAM", "ISAIAH", "VAUGHN", "GUS", "LOYD", "DIEGO", "ADOLPH", "NORRIS", "MILLARD", - "ROCCO", "GONZALO", "DERICK", "RODRIGO", "WILEY", "RIGOBERTO", "ALPHONSO", "TY", "NOE", "VERN", - "REED", "JEFFERSON", "ELVIS", "BERNARDO", "MAURICIO", "HIRAM", "DONOVAN", "BASIL", "RILEY", "NICKOLAS", - "MAYNARD", "SCOT", "VINCE", "QUINCY", "EDDY", "SEBASTIAN", "FEDERICO", "ULYSSES", "HERIBERTO", "DONNELL", - "COLE", "DAVIS", "GAVIN", "EMERY", "WARD", "ROMEO", "JAYSON", "DANTE", "CLEMENT", "COY", - "MAXWELL", "JARVIS", "BRUNO", "ISSAC", "DUDLEY", "BROCK", "SANFORD", "CARMELO", "BARNEY", "NESTOR", - "STEFAN", "DONNY", "ART", "LINWOOD", "BEAU", "WELDON", "GALEN", "ISIDRO", "TRUMAN", "DELMAR", - "JOHNATHON", "SILAS", "FREDERIC", "DICK", "IRWIN", "MERLIN", "CHARLEY", "MARCELINO", "HARRIS", "CARLO", - "TRENTON", "KURTIS", "HUNTER", "AURELIO", "WINFRED", "VITO", "COLLIN", "DENVER", "CARTER", "LEONEL", - "EMORY", "PASQUALE", "MOHAMMAD", "MARIANO", "DANIAL", "LANDON", "DIRK", "BRANDEN", "ADAN", "BUFORD", - "GERMAN", "WILMER", "EMERSON", "ZACHERY", "FLETCHER", "JACQUES", "ERROL", "DALTON", "MONROE", "JOSUE", - "EDWARDO", "BOOKER", "WILFORD", "SONNY", "SHELTON", "CARSON", "THERON", "RAYMUNDO", "DAREN", "HOUSTON", - "ROBBY", "LINCOLN", "GENARO", "BENNETT", "OCTAVIO", "CORNELL", "HUNG", "ARRON", "ANTONY", "HERSCHEL", - "GIOVANNI", "GARTH", "CYRUS", "CYRIL", "RONNY", "LON", "FREEMAN", "DUNCAN", "KENNITH", "CARMINE", - "ERICH", "CHADWICK", "WILBURN", "RUSS", "REID", "MYLES", "ANDERSON", "MORTON", "JONAS", "FOREST", - "MITCHEL", "MERVIN", "ZANE", "RICH", "JAMEL", "LAZARO", "ALPHONSE", "RANDELL", "MAJOR", "JARRETT", - "BROOKS", "ABDUL", "LUCIANO", "SEYMOUR", "EUGENIO", "MOHAMMED", "VALENTIN", "CHANCE", "ARNULFO", "LUCIEN", - "FERDINAND", "THAD", "EZRA", "ALDO", "RUBIN", "ROYAL", "MITCH", "EARLE", "ABE", "WYATT", - "MARQUIS", "LANNY", "KAREEM", "JAMAR", "BORIS", "ISIAH", "EMILE", "ELMO", "ARON", "LEOPOLDO", - "EVERETTE", "JOSEF", "ELOY", "RODRICK", "REINALDO", "LUCIO", "JERROD", "WESTON", "HERSHEL", "BARTON", - "PARKER", "LEMUEL", "BURT", "JULES", "GIL", "ELISEO", "AHMAD", "NIGEL", "EFREN", "ANTWAN", - "ALDEN", "MARGARITO", "COLEMAN", "DINO", "OSVALDO", "LES", "DEANDRE", "NORMAND", "KIETH", "TREY", - "NORBERTO", "NAPOLEON", "JEROLD", "FRITZ", "ROSENDO", "MILFORD", "CHRISTOPER", "ALFONZO", "LYMAN", "JOSIAH", - "BRANT", "WILTON", "RICO", "JAMAAL", "DEWITT", "BRENTON", "OLIN", "FOSTER", "FAUSTINO", "CLAUDIO", - "JUDSON", "GINO", "EDGARDO", "ALEC", "TANNER", "JARRED", "DONN", "TAD", "PRINCE", "PORFIRIO", - "ODIS", "LENARD", "CHAUNCEY", "TOD", "MEL", "MARCELO", "KORY", "AUGUSTUS", "KEVEN", "HILARIO", - "BUD", "SAL", "ORVAL", "MAURO", "ZACHARIAH", "OLEN", "ANIBAL", "MILO", "JED", "DILLON", - "AMADO", "NEWTON", "LENNY", "RICHIE", "HORACIO", "BRICE", "MOHAMED", "DELMER", "DARIO", "REYES", - "MAC", "JONAH", "JERROLD", "ROBT", "HANK", "RUPERT", "ROLLAND", "KENTON", "DAMION", "ANTONE", - "WALDO", "FREDRIC", "BRADLY", "KIP", "BURL", "WALKER", "TYREE", "JEFFEREY", "AHMED", "WILLY", - "STANFORD", "OREN", "NOBLE", "MOSHE", "MIKEL", "ENOCH", "BRENDON", "QUINTIN", "JAMISON", "FLORENCIO", - "DARRICK", "TOBIAS", "HASSAN", "GIUSEPPE", "DEMARCUS", "CLETUS", "TYRELL", "LYNDON", "KEENAN", "WERNER", - "GERALDO", "COLUMBUS", "CHET", "BERTRAM", "MARKUS", "HUEY", "HILTON", "DWAIN", "DONTE", "TYRON", - "OMER", "ISAIAS", "HIPOLITO", "FERMIN", "ADALBERTO", "BO", "BARRETT", "TEODORO", "MCKINLEY", "MAXIMO", - "GARFIELD", "RALEIGH", "LAWERENCE", "ABRAM", "RASHAD", "KING", "EMMITT", "DARON", "SAMUAL", "MIQUEL", - "EUSEBIO", "DOMENIC", "DARRON", "BUSTER", "WILBER", "RENATO", "JC", "HOYT", "HAYWOOD", "EZEKIEL", - "CHAS", "FLORENTINO", "ELROY", "CLEMENTE", "ARDEN", "NEVILLE", "EDISON", "DESHAWN", "NATHANIAL", "JORDON", - "DANILO", "CLAUD", "SHERWOOD", "RAYMON", "RAYFORD", "CRISTOBAL", "AMBROSE", "TITUS", "HYMAN", "FELTON", - "EZEQUIEL", "ERASMO", "STANTON", "LONNY", "LEN", "IKE", "MILAN", "LINO", "JAROD", "HERB", - "ANDREAS", "WALTON", "RHETT", "PALMER", "DOUGLASS", "CORDELL", "OSWALDO", "ELLSWORTH", "VIRGILIO", "TONEY", - "NATHANAEL", "DEL", "BENEDICT", "MOSE", "JOHNSON", "ISREAL", "GARRET", "FAUSTO", "ASA", "ARLEN", - "ZACK", "WARNER", "MODESTO", "FRANCESCO", "MANUAL", "GAYLORD", "GASTON", "FILIBERTO", "DEANGELO", "MICHALE", - "GRANVILLE", "WES", "MALIK", "ZACKARY", "TUAN", "ELDRIDGE", "CRISTOPHER", "CORTEZ", "ANTIONE", "MALCOM", - "LONG", "KOREY", "JOSPEH", "COLTON", "WAYLON", "VON", "HOSEA", "SHAD", "SANTO", "RUDOLF", - "ROLF", "REY", "RENALDO", "MARCELLUS", "LUCIUS", "KRISTOFER", "BOYCE", "BENTON", "HAYDEN", "HARLAND", - "ARNOLDO", "RUEBEN", "LEANDRO", "KRAIG", "JERRELL", "JEROMY", "HOBERT", "CEDRICK", "ARLIE", "WINFORD", - "WALLY", "LUIGI", "KENETH", "JACINTO", "GRAIG", "FRANKLYN", "EDMUNDO", "SID", "PORTER", "LEIF", - "JERAMY", "BUCK", "WILLIAN", "VINCENZO", "SHON", "LYNWOOD", "JERE", "HAI", "ELDEN", "DORSEY", - "DARELL", "BRODERICK", "ALONSO" - ] - total_sum = 0 - temp_sum = 0 - name.sort() - for i in range(len(name)): - for j in name[i]: - temp_sum += ord(j) - ord('A') + 1 - total_sum += (i + 1) * temp_sum - temp_sum = 0 - print(total_sum) - - -if __name__ == '__main__': - main() diff --git a/Project Euler/Problem 24/sol1.py b/Project Euler/Problem 24/sol1.py deleted file mode 100644 index b20493cb0..000000000 --- a/Project Euler/Problem 24/sol1.py +++ /dev/null @@ -1,7 +0,0 @@ -from itertools import permutations -def main(): - result=list(map("".join, permutations('0123456789'))) - print(result[999999]) - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/Project Euler/Problem 25/sol1.py b/Project Euler/Problem 25/sol1.py deleted file mode 100644 index f8cea3093..000000000 --- a/Project Euler/Problem 25/sol1.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import print_function - -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def fibonacci(n): - if n == 1 or type(n) is not int: - return 0 - elif n == 2: - return 1 - else: - sequence = [0, 1] - for i in xrange(2, n+1): - sequence.append(sequence[i-1] + sequence[i-2]) - - return sequence[n] - -def fibonacci_digits_index(n): - digits = 0 - index = 2 - - while digits < n: - index += 1 - digits = len(str(fibonacci(index))) - - return index - -if __name__ == '__main__': - print(fibonacci_digits_index(1000)) \ No newline at end of file diff --git a/Project Euler/Problem 28/sol1.py b/Project Euler/Problem 28/sol1.py deleted file mode 100644 index 4942115ce..000000000 --- a/Project Euler/Problem 28/sol1.py +++ /dev/null @@ -1,29 +0,0 @@ -from __future__ import print_function -from math import ceil - -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def diagonal_sum(n): - total = 1 - - for i in xrange(1, int(ceil(n/2.0))): - odd = 2*i+1 - even = 2*i - total = total + 4*odd**2 - 6*even - - return total - -if __name__ == '__main__': - import sys - - if len(sys.argv) == 1: - print(diagonal_sum(1001)) - else: - try: - n = int(sys.argv[1]) - diagonal_sum(n) - except ValueError: - print('Invalid entry - please enter a number') \ No newline at end of file diff --git a/Project Euler/Problem 29/solution.py b/Project Euler/Problem 29/solution.py deleted file mode 100644 index 64d35c84d..000000000 --- a/Project Euler/Problem 29/solution.py +++ /dev/null @@ -1,33 +0,0 @@ -def main(): - """ - Consider all integer combinations of ab for 2 <= a <= 5 and 2 <= b <= 5: - - 22=4, 23=8, 24=16, 25=32 - 32=9, 33=27, 34=81, 35=243 - 42=16, 43=64, 44=256, 45=1024 - 52=25, 53=125, 54=625, 55=3125 - If they are then placed in numerical order, with any repeats removed, - we get the following sequence of 15 distinct terms: - - 4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125 - - How many distinct terms are in the sequence generated by ab - for 2 <= a <= 100 and 2 <= b <= 100? - """ - - collectPowers = set() - - currentPow = 0 - - N = 101 # maximum limit - - for a in range(2, N): - for b in range(2, N): - currentPow = a**b # calculates the current power - collectPowers.add(currentPow) # adds the result to the set - - print("Number of terms ", len(collectPowers)) - - -if __name__ == '__main__': - main() diff --git a/Project Euler/Problem 36/sol1.py b/Project Euler/Problem 36/sol1.py deleted file mode 100644 index d78e7e59f..000000000 --- a/Project Euler/Problem 36/sol1.py +++ /dev/null @@ -1,30 +0,0 @@ -from __future__ import print_function -''' -Double-base palindromes -Problem 36 -The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. - -Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. - -(Please note that the palindromic number, in either base, may not include leading zeros.) -''' -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def is_palindrome(n): - n = str(n) - - if n == n[::-1]: - return True - else: - return False - -total = 0 - -for i in xrange(1, 1000000): - if is_palindrome(i) and is_palindrome(bin(i).split('b')[1]): - total += i - -print(total) \ No newline at end of file diff --git a/Project Euler/Problem 40/sol1.py b/Project Euler/Problem 40/sol1.py deleted file mode 100644 index ab4017512..000000000 --- a/Project Euler/Problem 40/sol1.py +++ /dev/null @@ -1,26 +0,0 @@ -#-.- coding: latin-1 -.- -from __future__ import print_function -''' -Champernowne's constant -Problem 40 -An irrational decimal fraction is created by concatenating the positive integers: - -0.123456789101112131415161718192021... - -It can be seen that the 12th digit of the fractional part is 1. - -If dn represents the nth digit of the fractional part, find the value of the following expression. - -d1 × d10 × d100 × d1000 × d10000 × d100000 × d1000000 -''' - -constant = [] -i = 1 - -while len(constant) < 1e6: - constant.append(str(i)) - i += 1 - -constant = ''.join(constant) - -print(int(constant[0])*int(constant[9])*int(constant[99])*int(constant[999])*int(constant[9999])*int(constant[99999])*int(constant[999999])) \ No newline at end of file diff --git a/Project Euler/Problem 48/sol1.py b/Project Euler/Problem 48/sol1.py deleted file mode 100644 index 5c4bdb0f6..000000000 --- a/Project Euler/Problem 48/sol1.py +++ /dev/null @@ -1,21 +0,0 @@ -from __future__ import print_function -''' -Self Powers -Problem 48 - -The series, 11 + 22 + 33 + ... + 1010 = 10405071317. - -Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000. -''' - -try: - xrange -except NameError: - xrange = range - -total = 0 -for i in xrange(1, 1001): - total += i**i - - -print(str(total)[-10:]) \ No newline at end of file diff --git a/Project Euler/Problem 52/sol1.py b/Project Euler/Problem 52/sol1.py deleted file mode 100644 index 376b4cfa1..000000000 --- a/Project Euler/Problem 52/sol1.py +++ /dev/null @@ -1,23 +0,0 @@ -from __future__ import print_function -''' -Permuted multiples -Problem 52 - -It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. - -Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits. -''' -i = 1 - -while True: - if sorted(list(str(i))) == \ - sorted(list(str(2*i))) == \ - sorted(list(str(3*i))) == \ - sorted(list(str(4*i))) == \ - sorted(list(str(5*i))) == \ - sorted(list(str(6*i))): - break - - i += 1 - -print(i) \ No newline at end of file diff --git a/Project Euler/Problem 53/sol1.py b/Project Euler/Problem 53/sol1.py deleted file mode 100644 index ed6d5329e..000000000 --- a/Project Euler/Problem 53/sol1.py +++ /dev/null @@ -1,36 +0,0 @@ -#-.- coding: latin-1 -.- -from __future__ import print_function -from math import factorial -''' -Combinatoric selections -Problem 53 - -There are exactly ten ways of selecting three from five, 12345: - -123, 124, 125, 134, 135, 145, 234, 235, 245, and 345 - -In combinatorics, we use the notation, 5C3 = 10. - -In general, - -nCr = n!/(r!(n−r)!),where r ≤ n, n! = n×(n−1)×...×3×2×1, and 0! = 1. -It is not until n = 23, that a value exceeds one-million: 23C10 = 1144066. - -How many, not necessarily distinct, values of nCr, for 1 ≤ n ≤ 100, are greater than one-million? -''' -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def combinations(n, r): - return factorial(n)/(factorial(r)*factorial(n-r)) - -total = 0 - -for i in xrange(1, 101): - for j in xrange(1, i+1): - if combinations(i, j) > 1e6: - total += 1 - -print(total) \ No newline at end of file diff --git a/Project Euler/Problem 76/sol1.py b/Project Euler/Problem 76/sol1.py deleted file mode 100644 index 2832f6d7a..000000000 --- a/Project Euler/Problem 76/sol1.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import print_function -''' -Counting Summations -Problem 76 - -It is possible to write five as a sum in exactly six different ways: - -4 + 1 -3 + 2 -3 + 1 + 1 -2 + 2 + 1 -2 + 1 + 1 + 1 -1 + 1 + 1 + 1 + 1 - -How many different ways can one hundred be written as a sum of at least two positive integers? -''' -try: - xrange #Python 2 -except NameError: - xrange = range #Python 3 - -def partition(m): - memo = [[0 for _ in xrange(m)] for _ in xrange(m+1)] - for i in xrange(m+1): - memo[i][0] = 1 - - for n in xrange(m+1): - for k in xrange(1, m): - memo[n][k] += memo[n][k-1] - if n > k: - memo[n][k] += memo[n-k-1][k] - - return (memo[m][m-1] - 1) - -print(partition(100)) \ No newline at end of file diff --git a/Project Euler/README.md b/Project Euler/README.md deleted file mode 100644 index 9f77f719f..000000000 --- a/Project Euler/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# ProjectEuler - -Problems are taken from https://projecteuler.net/. - -Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical -insights to solve. Project Euler is ideal for mathematicians who are learning to code. - -Here the efficiency of your code is also checked. -I've tried to provide all the best possible solutions. - -PROBLEMS: - -1. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3,5,6 and 9. The sum of these multiples is 23. - Find the sum of all the multiples of 3 or 5 below N. - -2. Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, - the first 10 terms will be: - 1,2,3,5,8,13,21,34,55,89,.. - By considering the terms in the Fibonacci sequence whose values do not exceed n, find the sum of the even-valued terms. - e.g. for n=10, we have {2,8}, sum is 10. - -3. The prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor of a given number N? - e.g. for 10, largest prime factor = 5. For 17, largest prime factor = 17. - -4. A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. - Find the largest palindrome made from the product of two 3-digit numbers which is less than N. - -5. 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. - What is the smallest positive number that is evenly divisible(divisible with no remainder) by all of the numbers from 1 to N? - -6. The sum of the squares of the first ten natural numbers is, - 1^2 + 2^2 + ... + 10^2 = 385 - The square of the sum of the first ten natural numbers is, - (1 + 2 + ... + 10)^2 = 552 = 3025 - Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640. - Find the difference between the sum of the squares of the first N natural numbers and the square of the sum. - -7. By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. - What is the Nth prime number? - -9. A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, - a^2 + b^2 = c^2 - There exists exactly one Pythagorean triplet for which a + b + c = 1000. - Find the product abc. - -14. The following iterative sequence is defined for the set of positive integers: - n → n/2 (n is even) - n → 3n + 1 (n is odd) - Using the rule above and starting with 13, we generate the following sequence: - 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1 - Which starting number, under one million, produces the longest chain? - -16. 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. - What is the sum of the digits of the number 2^1000? -20. n! means n × (n − 1) × ... × 3 × 2 × 1 - For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, - and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. - Find the sum of the digits in the number 100! diff --git a/boolean_algebra/Quine_McCluskey/QuineMcCluskey.py b/boolean_algebra/Quine_McCluskey/QuineMcCluskey.py deleted file mode 100644 index ff2df5117..000000000 --- a/boolean_algebra/Quine_McCluskey/QuineMcCluskey.py +++ /dev/null @@ -1,116 +0,0 @@ -def compare_string(string1, string2): - l1 = list(string1); l2 = list(string2) - count = 0 - for i in range(len(l1)): - if l1[i] != l2[i]: - count += 1 - l1[i] = '_' - if count > 1: - return -1 - else: - return("".join(l1)) - -def check(binary): - pi = [] - while 1: - check1 = ['$']*len(binary) - temp = [] - for i in range(len(binary)): - for j in range(i+1, len(binary)): - k=compare_string(binary[i], binary[j]) - if k != -1: - check1[i] = '*' - check1[j] = '*' - temp.append(k) - for i in range(len(binary)): - if check1[i] == '$': - pi.append(binary[i]) - if len(temp) == 0: - return pi - binary = list(set(temp)) - -def decimal_to_binary(no_of_variable, minterms): - temp = [] - s = '' - for m in minterms: - for i in range(no_of_variable): - s = str(m%2) + s - m //= 2 - temp.append(s) - s = '' - return temp - -def is_for_table(string1, string2, count): - l1 = list(string1);l2=list(string2) - count_n = 0 - for i in range(len(l1)): - if l1[i] != l2[i]: - count_n += 1 - if count_n == count: - return True - else: - return False - -def selection(chart, prime_implicants): - temp = [] - select = [0]*len(chart) - for i in range(len(chart[0])): - count = 0 - rem = -1 - for j in range(len(chart)): - if chart[j][i] == 1: - count += 1 - rem = j - if count == 1: - select[rem] = 1 - for i in range(len(select)): - if select[i] == 1: - for j in range(len(chart[0])): - if chart[i][j] == 1: - for k in range(len(chart)): - chart[k][j] = 0 - temp.append(prime_implicants[i]) - while 1: - max_n = 0; rem = -1; count_n = 0 - for i in range(len(chart)): - count_n = chart[i].count(1) - if count_n > max_n: - max_n = count_n - rem = i - - if max_n == 0: - return temp - - temp.append(prime_implicants[rem]) - - for i in range(len(chart[0])): - if chart[rem][i] == 1: - for j in range(len(chart)): - chart[j][i] = 0 - -def prime_implicant_chart(prime_implicants, binary): - chart = [[0 for x in range(len(binary))] for x in range(len(prime_implicants))] - for i in range(len(prime_implicants)): - count = prime_implicants[i].count('_') - for j in range(len(binary)): - if(is_for_table(prime_implicants[i], binary[j], count)): - chart[i][j] = 1 - - return chart - -def main(): - no_of_variable = int(raw_input("Enter the no. of variables\n")) - minterms = [int(x) for x in raw_input("Enter the decimal representation of Minterms 'Spaces Seprated'\n").split()] - binary = decimal_to_binary(no_of_variable, minterms) - - prime_implicants = check(binary) - print("Prime Implicants are:") - print(prime_implicants) - chart = prime_implicant_chart(prime_implicants, binary) - - essential_prime_implicants = selection(chart,prime_implicants) - print("Essential Prime Implicants are:") - print(essential_prime_implicants) - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/ciphers/Onepad_Cipher.py b/ciphers/Onepad_Cipher.py deleted file mode 100644 index 7e1be5fdc..000000000 --- a/ciphers/Onepad_Cipher.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import print_function - -import random - - -class Onepad: - def encrypt(self, text): - '''Function to encrypt text using psedo-random numbers''' - plain = [ord(i) for i in text] - key = [] - cipher = [] - for i in plain: - k = random.randint(1, 300) - c = (i+k)*k - cipher.append(c) - key.append(k) - return cipher, key - - def decrypt(self, cipher, key): - '''Function to decrypt text using psedo-random numbers.''' - plain = [] - for i in range(len(key)): - p = (cipher[i]-(key[i])**2)/key[i] - plain.append(chr(p)) - plain = ''.join([i for i in plain]) - return plain - - -if __name__ == '__main__': - c, k = Onepad().encrypt('Hello') - print(c, k) - print(Onepad().decrypt(c, k)) diff --git a/ciphers/Prehistoric Men.txt b/ciphers/Prehistoric Men.txt deleted file mode 100644 index 86c4de821..000000000 --- a/ciphers/Prehistoric Men.txt +++ /dev/null @@ -1,7193 +0,0 @@ -The Project Gutenberg eBook, Prehistoric Men, by Robert J. (Robert John) -Braidwood, Illustrated by Susan T. Richert - - -This eBook is for the use of anyone anywhere in the United States and most -other parts of the world at no cost and with almost no restrictions -whatsoever. You may copy it, give it away or re-use it under the terms of -the Project Gutenberg License included with this eBook or online at -www.gutenberg.org. If you are not located in the United States, you'll have -to check the laws of the country where you are located before using this ebook. - - -Title: Prehistoric Men -Author: Robert J. (Robert John) Braidwood -Release Date: July 28, 2016 [eBook #52664] -Language: English -Character set encoding: UTF-8 - - -***START OF THE PROJECT GUTENBERG EBOOK PREHISTORIC MEN*** - - -E-text prepared by Stephen Hutcheson, Dave Morgan, Charlie Howard, and the -Online Distributed Proofreading Team (http://www.pgdp.net) - - - -Note: Project Gutenberg also has an HTML version of this - file which includes the original illustrations. - See 52664-h.htm or 52664-h.zip: - (http://www.gutenberg.org/files/52664/52664-h/52664-h.htm) - or - (http://www.gutenberg.org/files/52664/52664-h.zip) - - -Transcriber's note: - - Some characters might not display in this UTF-8 text - version. If so, the reader should consult the HTML - version referred to above. One example of this might - occur in the second paragraph under "Choppers and - Adze-like Tools", page 46, which contains the phrase - an adze cutting edge is ? shaped. The symbol before - shaped looks like a sharply-italicized sans-serif L. - Devices that cannot display that symbol may substitute - a question mark, a square, or other symbol. - - -PREHISTORIC MEN - -by - -ROBERT J. BRAIDWOOD - -Research Associate, Old World Prehistory - -Professor -Oriental Institute and Department of Anthropology -University of Chicago - -Drawings by Susan T. Richert - - -[Illustration] - -Chicago Natural History Museum -Popular Series -Anthropology, Number 37 - -Third Edition Issued in Co-operation with -The Oriental Institute, The University of Chicago - -Edited by Lillian A. Ross - -Printed in the United States of America -by Chicago Natural History Museum Press - -Copyright 1948, 1951, and 1957 by Chicago Natural History Museum - -First edition 1948 -Second edition 1951 -Third edition 1957 -Fourth edition 1959 - - -Preface - -[Illustration] - - -Like the writing of most professional archeologists, mine has been -confined to so-called learned papers. Good, bad, or indifferent, these -papers were in a jargon that only my colleagues and a few advanced -students could understand. Hence, when I was asked to do this little -book, I soon found it extremely difficult to say what I meant in simple -fashion. The style is new to me, but I hope the reader will not find it -forced or pedantic; at least I have done my very best to tell the story -simply and clearly. - -Many friends have aided in the preparation of the book. The whimsical -charm of Miss Susan Richerts illustrations add enormously to the -spirit I wanted. She gave freely of her own time on the drawings and -in planning the book with me. My colleagues at the University of -Chicago, especially Professor Wilton M. Krogman (now of the University -of Pennsylvania), and also Mrs. Linda Braidwood, Associate of the -Oriental Institute, and Professors Fay-Cooper Cole and Sol Tax, of -the Department of Anthropology, gave me counsel in matters bearing on -their special fields, and the Department of Anthropology bore some of -the expense of the illustrations. From Mrs. Irma Hunter and Mr. Arnold -Maremont, who are not archeologists at all and have only an intelligent -laymans notion of archeology, I had sound advice on how best to tell -the story. I am deeply indebted to all these friends. - -While I was preparing the second edition, I had the great fortune -to be able to rework the third chapter with Professor Sherwood L. -Washburn, now of the Department of Anthropology of the University of -California, and the fourth, fifth, and sixth chapters with Professor -Hallum L. Movius, Jr., of the Peabody Museum, Harvard University. The -book has gained greatly in accuracy thereby. In matters of dating, -Professor Movius and the indications of Professor W. F. Libbys Carbon -14 chronology project have both encouraged me to choose the lowest -dates now current for the events of the Pleistocene Ice Age. There is -still no certain way of fixing a direct chronology for most of the -Pleistocene, but Professor Libbys method appears very promising for -its end range and for proto-historic dates. In any case, this book -names periods, and new dates may be written in against mine, if new -and better dating systems appear. - -I wish to thank Dr. Clifford C. Gregg, Director of Chicago Natural -History Museum, for the opportunity to publish this book. My old -friend, Dr. Paul S. Martin, Chief Curator in the Department of -Anthropology, asked me to undertake the job and inspired me to complete -it. I am also indebted to Miss Lillian A. Ross, Associate Editor of -Scientific Publications, and to Mr. George I. Quimby, Curator of -Exhibits in Anthropology, for all the time they have given me in -getting the manuscript into proper shape. - - ROBERT J. BRAIDWOOD - _June 15, 1950_ - - - - -Preface to the Third Edition - - -In preparing the enlarged third edition, many of the above mentioned -friends have again helped me. I have picked the brains of Professor F. -Clark Howell of the Department of Anthropology of the University of -Chicago in reworking the earlier chapters, and he was very patient in -the matter, which I sincerely appreciate. - -All of Mrs. Susan Richert Allens original drawings appear, but a few -necessary corrections have been made in some of the charts and some new -drawings have been added by Mr. John Pfiffner, Staff Artist, Chicago -Natural History Museum. - - ROBERT J. BRAIDWOOD - _March 1, 1959_ - - - - -Contents - - - PAGE - How We Learn about Prehistoric Men 7 - - The Changing World in Which Prehistoric Men Lived 17 - - Prehistoric Men Themselves 22 - - Cultural Beginnings 38 - - More Evidence of Culture 56 - - Early Moderns 70 - - End and Prelude 92 - - The First Revolution 121 - - The Conquest of Civilization 144 - - End of Prehistory 162 - - Summary 176 - - List of Books 180 - - Index 184 - - - - -HOW WE LEARN about Prehistoric Men - -[Illustration] - - -Prehistory means the time before written history began. Actually, more -than 99 per cent of mans story is prehistory. Man is at least half a -million years old, but he did not begin to write history (or to write -anything) until about 5,000 years ago. - -The men who lived in prehistoric times left us no history books, but -they did unintentionally leave a record of their presence and their way -of life. This record is studied and interpreted by different kinds of -scientists. - - -SCIENTISTS WHO FIND OUT ABOUT PREHISTORIC MEN - -The scientists who study the bones and teeth and any other parts -they find of the bodies of prehistoric men, are called _physical -anthropologists_. Physical anthropologists are trained, much like -doctors, to know all about the human body. They study living people, -too; they know more about the biological facts of human races than -anybody else. If the police find a badly decayed body in a trunk, -they ask a physical anthropologist to tell them what the person -originally looked like. The physical anthropologists who specialize in -prehistoric men work with fossils, so they are sometimes called _human -paleontologists_. - - -ARCHEOLOGISTS - -There is a kind of scientist who studies the things that prehistoric -men made and did. Such a scientist is called an _archeologist_. It is -the archeologists business to look for the stone and metal tools, the -pottery, the graves, and the caves or huts of the men who lived before -history began. - -But there is more to archeology than just looking for things. In -Professor V. Gordon Childes words, archeology furnishes a sort of -history of human activity, provided always that the actions have -produced concrete results and left recognizable material traces. You -will see that there are at least three points in what Childe says: - - 1. The archeologists have to find the traces of things left behind by - ancient man, and - - 2. Only a few objects may be found, for most of these were probably - too soft or too breakable to last through the years. However, - - 3. The archeologist must use whatever he can find to tell a story--to - make a sort of history--from the objects and living-places and - graves that have escaped destruction. - -What I mean is this: Let us say you are walking through a dump yard, -and you find a rusty old spark plug. If you want to think about what -the spark plug means, you quickly remember that it is a part of an -automobile motor. This tells you something about the man who threw -the spark plug on the dump. He either had an automobile, or he knew -or lived near someone who did. He cant have lived so very long ago, -youll remember, because spark plugs and automobiles are only about -sixty years old. - -When you think about the old spark plug in this way you have -just been making the beginnings of what we call an archeological -_interpretation_; you have been making the spark plug tell a story. -It is the same way with the man-made things we archeologists find -and put in museums. Usually, only a few of these objects are pretty -to look at; but each of them has some sort of story to tell. Making -the interpretation of his finds is the most important part of the -archeologists job. It is the way he gets at the sort of history of -human activity which is expected of archeology. - - -SOME OTHER SCIENTISTS - -There are many other scientists who help the archeologist and the -physical anthropologist find out about prehistoric men. The geologists -help us tell the age of the rocks or caves or gravel beds in which -human bones or man-made objects are found. There are other scientists -with names which all begin with paleo (the Greek word for old). The -_paleontologists_ study fossil animals. There are also, for example, -such scientists as _paleobotanists_ and _paleoclimatologists_, who -study ancient plants and climates. These scientists help us to know -the kinds of animals and plants that were living in prehistoric times -and so could be used for food by ancient man; what the weather was -like; and whether there were glaciers. Also, when I tell you that -prehistoric men did not appear until long after the great dinosaurs had -disappeared, I go on the say-so of the paleontologists. They know that -fossils of men and of dinosaurs are not found in the same geological -period. The dinosaur fossils come in early periods, the fossils of men -much later. - -Since World War II even the atomic scientists have been helping the -archeologists. By testing the amount of radioactivity left in charcoal, -wood, or other vegetable matter obtained from archeological sites, they -have been able to date the sites. Shell has been used also, and even -the hair of Egyptian mummies. The dates of geological and climatic -events have also been discovered. Some of this work has been done from -drillings taken from the bottom of the sea. - -This dating by radioactivity has considerably shortened the dates which -the archeologists used to give. If you find that some of the dates -I give here are more recent than the dates you see in other books -on prehistory, it is because I am using one of the new lower dating -systems. - -[Illustration: RADIOCARBON CHART - -The rate of disappearance of radioactivity as time passes.[1]] - - [1] It is important that the limitations of the radioactive carbon - dating system be held in mind. As the statistics involved in - the system are used, there are two chances in three that the - date of the sample falls within the range given as plus or - minus an added number of years. For example, the date for the - Jarmo village (see chart), given as 6750 200 B.C., really - means that there are only two chances in three that the real - date of the charcoal sampled fell between 6950 and 6550 B.C. - We have also begun to suspect that there are ways in which the - samples themselves may have become contaminated, either on - the early or on the late side. We now tend to be suspicious of - single radioactive carbon determinations, or of determinations - from one site alone. But as a fabric of consistent - determinations for several or more sites of one archeological - period, we gain confidence in the dates. - - -HOW THE SCIENTISTS FIND OUT - -So far, this chapter has been mainly about the people who find out -about prehistoric men. We also need a word about _how_ they find out. - -All our finds came by accident until about a hundred years ago. Men -digging wells, or digging in caves for fertilizer, often turned up -ancient swords or pots or stone arrowheads. People also found some odd -pieces of stone that didnt look like natural forms, but they also -didnt look like any known tool. As a result, the people who found them -gave them queer names; for example, thunderbolts. The people thought -the strange stones came to earth as bolts of lightning. We know now -that these strange stones were prehistoric stone tools. - -Many important finds still come to us by accident. In 1935, a British -dentist, A. T. Marston, found the first of two fragments of a very -important fossil human skull, in a gravel pit at Swanscombe, on the -River Thames, England. He had to wait nine months, until the face of -the gravel pit had been dug eight yards farther back, before the second -fragment appeared. They fitted! Then, twenty years later, still another -piece appeared. In 1928 workmen who were blasting out rock for the -breakwater in the port of Haifa began to notice flint tools. Thus the -story of cave men on Mount Carmel, in Palestine, began to be known. - -Planned archeological digging is only about a century old. Even before -this, however, a few men realized the significance of objects they dug -from the ground; one of these early archeologists was our own Thomas -Jefferson. The first real mound-digger was a German grocers clerk, -Heinrich Schliemann. Schliemann made a fortune as a merchant, first -in Europe and then in the California gold-rush of 1849. He became an -American citizen. Then he retired and had both money and time to test -an old idea of his. He believed that the heroes of ancient Troy and -Mycenae were once real Trojans and Greeks. He proved it by going to -Turkey and Greece and digging up the remains of both cities. - -Schliemann had the great good fortune to find rich and spectacular -treasures, and he also had the common sense to keep notes and make -descriptions of what he found. He proved beyond doubt that many ancient -city mounds can be _stratified_. This means that there may be the -remains of many towns in a mound, one above another, like layers in a -cake. - -You might like to have an idea of how mounds come to be in layers. -The original settlers may have chosen the spot because it had a good -spring and there were good fertile lands nearby, or perhaps because -it was close to some road or river or harbor. These settlers probably -built their town of stone and mud-brick. Finally, something would have -happened to the town--a flood, or a burning, or a raid by enemies--and -the walls of the houses would have fallen in or would have melted down -as mud in the rain. Nothing would have remained but the mud and debris -of a low mound of _one_ layer. - -The second settlers would have wanted the spot for the same reasons -the first settlers did--good water, land, and roads. Also, the second -settlers would have found a nice low mound to build their houses on, -a protection from floods. But again, something would finally have -happened to the second town, and the walls of _its_ houses would have -come tumbling down. This makes the _second_ layer. And so on.... - -In Syria I once had the good fortune to dig on a large mound that had -no less than fifteen layers. Also, most of the layers were thick, and -there were signs of rebuilding and repairs within each layer. The mound -was more than a hundred feet high. In each layer, the building material -used had been a soft, unbaked mud-brick, and most of the debris -consisted of fallen or rain-melted mud from these mud-bricks. - -This idea of _stratification_, like the cake layers, was already a -familiar one to the geologists by Schliemanns time. They could show -that their lowest layer of rock was oldest or earliest, and that the -overlying layers became more recent as one moved upward. Schliemanns -digging proved the same thing at Troy. His first (lowest and earliest) -city had at least nine layers above it; he thought that the second -layer contained the remains of Homers Troy. We now know that Homeric -Troy was layer VIIa from the bottom; also, we count eleven layers or -sub-layers in total. - -Schliemanns work marks the beginnings of modern archeology. Scholars -soon set out to dig on ancient sites, from Egypt to Central America. - - -ARCHEOLOGICAL INFORMATION - -As time went on, the study of archeological materials--found either -by accident or by digging on purpose--began to show certain things. -Archeologists began to get ideas as to the kinds of objects that -belonged together. If you compared a mail-order catalogue of 1890 with -one of today, you would see a lot of differences. If you really studied -the two catalogues hard, you would also begin to see that certain -objects go together. Horseshoes and metal buggy tires and pieces of -harness would begin to fit into a picture with certain kinds of coal -stoves and furniture and china dishes and kerosene lamps. Our friend -the spark plug, and radios and electric refrigerators and light bulbs -would fit into a picture with different kinds of furniture and dishes -and tools. You wont be old enough to remember the kind of hats that -women wore in 1890, but youve probably seen pictures of them, and you -know very well they couldnt be worn with the fashions of today. - -This is one of the ways that archeologists study their materials. -The various tools and weapons and jewelry, the pottery, the kinds -of houses, and even the ways of burying the dead tend to fit into -pictures. Some archeologists call all of the things that go together to -make such a picture an _assemblage_. The assemblage of the first layer -of Schliemanns Troy was as different from that of the seventh layer as -our 1900 mail-order catalogue is from the one of today. - -The archeologists who came after Schliemann began to notice other -things and to compare them with occurrences in modern times. The -idea that people will buy better mousetraps goes back into very -ancient times. Today, if we make good automobiles or radios, we can -sell some of them in Turkey or even in Timbuktu. This means that a -few present-day types of American automobiles and radios form part -of present-day assemblages in both Turkey and Timbuktu. The total -present-day assemblage of Turkey is quite different from that of -Timbuktu or that of America, but they have at least some automobiles -and some radios in common. - -Now these automobiles and radios will eventually wear out. Let us -suppose we could go to some remote part of Turkey or to Timbuktu in a -dream. We dont know what the date is, in our dream, but we see all -sorts of strange things and ways of living in both places. Nobody -tells us what the date is. But suddenly we see a 1936 Ford; so we -know that in our dream it has to be at least the year 1936, and only -as many years after that as we could reasonably expect a Ford to keep -in running order. The Ford would probably break down in twenty years -time, so the Turkish or Timbuktu assemblage were seeing in our dream -has to date at about A.D. 1936-56. - -Archeologists not only date their ancient materials in this way; they -also see over what distances and between which peoples trading was -done. It turns out that there was a good deal of trading in ancient -times, probably all on a barter and exchange basis. - - -EVERYTHING BEGINS TO FIT TOGETHER - -Now we need to pull these ideas all together and see the complicated -structure the archeologists can build with their materials. - -Even the earliest archeologists soon found that there was a very long -range of prehistoric time which would yield only very simple things. -For this very long early part of prehistory, there was little to be -found but the flint tools which wandering, hunting and gathering -people made, and the bones of the wild animals they ate. Toward the -end of prehistoric time there was a general settling down with the -coming of agriculture, and all sorts of new things began to be made. -Archeologists soon got a general notion of what ought to appear with -what. Thus, it would upset a French prehistorian digging at the bottom -of a very early cave if he found a fine bronze sword, just as much as -it would upset him if he found a beer bottle. The people of his very -early cave layer simply could not have made bronze swords, which came -later, just as do beer bottles. Some accidental disturbance of the -layers of his cave must have happened. - -With any luck, archeologists do their digging in a layered, stratified -site. They find the remains of everything that would last through -time, in several different layers. They know that the assemblage in -the bottom layer was laid down earlier than the assemblage in the next -layer above, and so on up to the topmost layer, which is the latest. -They look at the results of other digs and find that some other -archeologist 900 miles away has found ax-heads in his lowest layer, -exactly like the ax-heads of their fifth layer. This means that their -fifth layer must have been lived in at about the same time as was the -first layer in the site 200 miles away. It also may mean that the -people who lived in the two layers knew and traded with each other. Or -it could mean that they didnt necessarily know each other, but simply -that both traded with a third group at about the same time. - -You can see that the more we dig and find, the more clearly the main -facts begin to stand out. We begin to be more sure of which people -lived at the same time, which earlier and which later. We begin to -know who traded with whom, and which peoples seemed to live off by -themselves. We begin to find enough skeletons in burials so that the -physical anthropologists can tell us what the people looked like. We -get animal bones, and a paleontologist may tell us they are all bones -of wild animals; or he may tell us that some or most of the bones are -those of domesticated animals, for instance, sheep or cattle, and -therefore the people must have kept herds. - -More important than anything else--as our structure grows more -complicated and our materials increase--is the fact that a sort -of history of human activity does begin to appear. The habits or -traditions that men formed in the making of their tools and in the -ways they did things, begin to stand out for us. How characteristic -were these habits and traditions? What areas did they spread over? -How long did they last? We watch the different tools and the traces -of the way things were done--how the burials were arranged, what -the living-places were like, and so on. We wonder about the people -themselves, for the traces of habits and traditions are useful to us -only as clues to the men who once had them. So we ask the physical -anthropologists about the skeletons that we found in the burials. The -physical anthropologists tell us about the anatomy and the similarities -and differences which the skeletons show when compared with other -skeletons. The physical anthropologists are even working on a -method--chemical tests of the bones--that will enable them to discover -what the blood-type may have been. One thing is sure. We have never -found a group of skeletons so absolutely similar among themselves--so -cast from a single mould, so to speak--that we could claim to have a -pure race. I am sure we never shall. - -We become particularly interested in any signs of change--when new -materials and tool types and ways of doing things replace old ones. We -watch for signs of social change and progress in one way or another. - -We must do all this without one word of written history to aid us. -Everything we are concerned with goes back to the time _before_ men -learned to write. That is the prehistorians job--to find out what -happened before history began. - - - - -THE CHANGING WORLD in which Prehistoric Men Lived - -[Illustration] - - -Mankind, well say, is at least a half million years old. It is very -hard to understand how long a time half a million years really is. -If we were to compare this whole length of time to one day, wed get -something like this: The present time is midnight, and Jesus was -born just five minutes and thirty-six seconds ago. Earliest history -began less than fifteen minutes ago. Everything before 11:45 was in -prehistoric time. - -Or maybe we can grasp the length of time better in terms of -generations. As you know, primitive peoples tend to marry and have -children rather early in life. So suppose we say that twenty years -will make an average generation. At this rate there would be 25,000 -generations in a half-million years. But our United States is much less -than ten generations old, twenty-five generations take us back before -the time of Columbus, Julius Caesar was alive just 100 generations ago, -David was king of Israel less than 150 generations ago, 250 generations -take us back to the beginning of written history. And there were 24,750 -generations of men before written history began! - -I should probably tell you that there is a new method of prehistoric -dating which would cut the earliest dates in my reckoning almost -in half. Dr. Cesare Emiliani, combining radioactive (C14) and -chemical (oxygen isotope) methods in the study of deep-sea borings, -has developed a system which would lower the total range of human -prehistory to about 300,000 years. The system is still too new to have -had general examination and testing. Hence, I have not used it in this -book; it would mainly affect the dates earlier than 25,000 years ago. - - -CHANGES IN ENVIRONMENT - -The earth probably hasnt changed much in the last 5,000 years (250 -generations). Men have built things on its surface and dug into it and -drawn boundaries on maps of it, but the places where rivers, lakes, -seas, and mountains now stand have changed very little. - -In earlier times the earth looked very different. Geologists call the -last great geological period the _Pleistocene_. It began somewhere -between a half million and a million years ago, and was a time of great -changes. Sometimes we call it the Ice Age, for in the Pleistocene -there were at least three or four times when large areas of earth -were covered with glaciers. The reason for my uncertainty is that -while there seem to have been four major mountain or alpine phases of -glaciation, there may only have been three general continental phases -in the Old World.[2] - - [2] This is a complicated affair and I do not want to bother you - with its details. Both the alpine and the continental ice sheets - seem to have had minor fluctuations during their _main_ phases, - and the advances of the later phases destroyed many of the - traces of the earlier phases. The general textbooks have tended - to follow the names and numbers established for the Alps early - in this century by two German geologists. I will not bother you - with the names, but there were _four_ major phases. It is the - second of these alpine phases which seems to fit the traces of - the earliest of the great continental glaciations. In this book, - I will use the four-part system, since it is the most familiar, - but will add the word _alpine_ so you may remember to make the - transition to the continental system if you wish to do so. - -Glaciers are great sheets of ice, sometimes over a thousand feet -thick, which are now known only in Greenland and Antarctica and in -high mountains. During several of the glacial periods in the Ice Age, -the glaciers covered most of Canada and the northern United States and -reached down to southern England and France in Europe. Smaller ice -sheets sat like caps on the Rockies, the Alps, and the Himalayas. The -continental glaciation only happened north of the equator, however, so -remember that Ice Age is only half true. - -As you know, the amount of water on and about the earth does not vary. -These large glaciers contained millions of tons of water frozen into -ice. Because so much water was frozen and contained in the glaciers, -the water level of lakes and oceans was lowered. Flooded areas were -drained and appeared as dry land. There were times in the Ice Age when -there was no English Channel, so that England was not an island, and a -land bridge at the Dardanelles probably divided the Mediterranean from -the Black Sea. - -A very important thing for people living during the time of a -glaciation was the region adjacent to the glacier. They could not, of -course, live on the ice itself. The questions would be how close could -they live to it, and how would they have had to change their way of -life to do so. - - -GLACIERS CHANGE THE WEATHER - -Great sheets of ice change the weather. When the front of a glacier -stood at Milwaukee, the weather must have been bitterly cold in -Chicago. The climate of the whole world would have been different, and -you can see how animals and men would have been forced to move from one -place to another in search of food and warmth. - -On the other hand, it looks as if only a minor proportion of the whole -Ice Age was really taken up by times of glaciation. In between came -the _interglacial_ periods. During these times the climate around -Chicago was as warm as it is now, and sometimes even warmer. It may -interest you to know that the last great glacier melted away less than -10,000 years ago. Professor Ernst Antevs thinks we may be living in an -interglacial period and that the Ice Age may not be over yet. So if you -want to make a killing in real estate for your several hundred times -great-grandchildren, you might buy some land in the Arizona desert or -the Sahara. - -We do not yet know just why the glaciers appeared and disappeared, as -they did. It surely had something to do with an increase in rainfall -and a fall in temperature. It probably also had to do with a general -tendency for the land to rise at the beginning of the Pleistocene. We -know there was some mountain-building at that time. Hence, rain-bearing -winds nourished the rising and cooler uplands with snow. An increase -in all three of these factors--if they came together--would only have -needed to be slight. But exactly why this happened we do not know. - -The reason I tell you about the glaciers is simply to remind you of the -changing world in which prehistoric men lived. Their surroundings--the -animals and plants they used for food, and the weather they had to -protect themselves from--were always changing. On the other hand, this -change happened over so long a period of time and was so slow that -individual people could not have noticed it. Glaciers, about which they -probably knew nothing, moved in hundreds of miles to the north of them. -The people must simply have wandered ever more southward in search -of the plants and animals on which they lived. Or some men may have -stayed where they were and learned to hunt different animals and eat -different foods. Prehistoric men had to keep adapting themselves to new -environments and those who were most adaptive were most successful. - - -OTHER CHANGES - -Changes took place in the men themselves as well as in the ways they -lived. As time went on, they made better tools and weapons. Then, too, -we begin to find signs of how they started thinking of other things -than food and the tools to get it with. We find that they painted on -the walls of caves, and decorated their tools; we find that they buried -their dead. - -At about the time when the last great glacier was finally melting away, -men in the Near East made the first basic change in human economy. -They began to plant grain, and they learned to raise and herd certain -animals. This meant that they could store food in granaries and on the -hoof against the bad times of the year. This first really basic change -in mans way of living has been called the food-producing revolution. -By the time it happened, a modern kind of climate was beginning. Men -had already grown to look as they do now. Know-how in ways of living -had developed and progressed, slowly but surely, up to a point. It was -impossible for men to go beyond that point if they only hunted and -fished and gathered wild foods. Once the basic change was made--once -the food-producing revolution became effective--technology leaped ahead -and civilization and written history soon began. - - - - -Prehistoric Men THEMSELVES - -[Illustration] - - -DO WE KNOW WHERE MAN ORIGINATED? - -For a long time some scientists thought the cradle of mankind was in -central Asia. Other scientists insisted it was in Africa, and still -others said it might have been in Europe. Actually, we dont know -where it was. We dont even know that there was only _one_ cradle. -If we had to choose a cradle at this moment, we would probably say -Africa. But the southern portions of Asia and Europe may also have been -included in the general area. The scene of the early development of -mankind was certainly the Old World. It is pretty certain men didnt -reach North or South America until almost the end of the Ice Age--had -they done so earlier we would certainly have found some trace of them -by now. - -The earliest tools we have yet found come from central and south -Africa. By the dating system Im using, these tools must be over -500,000 years old. There are now reports that a few such early tools -have been found--at the Sterkfontein cave in South Africa--along with -the bones of small fossil men called australopithecines. - -Not all scientists would agree that the australopithecines were men, -or would agree that the tools were made by the australopithecines -themselves. For these sticklers, the earliest bones of men come from -the island of Java. The date would be about 450,000 years ago. So far, -we have not yet found the tools which we suppose these earliest men in -the Far East must have made. - -Let me say it another way. How old are the earliest traces of men we -now have? Over half a million years. This was a time when the first -alpine glaciation was happening in the north. What has been found so -far? The tools which the men of those times made, in different parts -of Africa. It is now fairly generally agreed that the men who made -the tools were the australopithecines. There is also a more man-like -jawbone at Kanam in Kenya, but its find-spot has been questioned. The -next earliest bones we have were found in Java, and they may be almost -a hundred thousand years younger than the earliest African finds. We -havent yet found the tools of these early Javanese. Our knowledge of -tool-using in Africa spreads quickly as time goes on: soon after the -appearance of tools in the south we shall have them from as far north -as Algeria. - -Very soon after the earliest Javanese come the bones of slightly more -developed people in Java, and the jawbone of a man who once lived in -what is now Germany. The same general glacial beds which yielded the -later Javanese bones and the German jawbone also include tools. These -finds come from the time of the second alpine glaciation. - -So this is the situation. By the time of the end of the second alpine -or first continental glaciation (say 400,000 years ago) we have traces -of men from the extremes of the more southerly portions of the Old -World--South Africa, eastern Asia, and western Europe. There are also -some traces of men in the middle ground. In fact, Professor Franz -Weidenreich believed that creatures who were the immediate ancestors -of men had already spread over Europe, Africa, and Asia by the time -the Ice Age began. We certainly have no reason to disbelieve this, but -fortunate accidents of discovery have not yet given us the evidence to -prove it. - - -MEN AND APES - -Many people used to get extremely upset at the ill-formed notion -that man descended from the apes. Such words were much more likely -to start fights or monkey trials than the correct notion that all -living animals, including man, ascended or evolved from a single-celled -organism which lived in the primeval seas hundreds of millions of years -ago. Men are mammals, of the order called Primates, and mans living -relatives are the great apes. Men didnt descend from the apes or -apes from men, and mankind must have had much closer relatives who have -since become extinct. - -Men stand erect. They also walk and run on their two feet. Apes are -happiest in trees, swinging with their arms from branch to branch. -Few branches of trees will hold the mighty gorilla, although he still -manages to sleep in trees. Apes cant stand really erect in our sense, -and when they have to run on the ground, they use the knuckles of their -hands as well as their feet. - -A key group of fossil bones here are the south African -australopithecines. These are called the _Australopithecinae_ or -man-apes or sometimes even ape-men. We do not _know_ that they were -directly ancestral to men but they can hardly have been so to apes. -Presently Ill describe them a bit more. The reason I mention them -here is that while they had brains no larger than those of apes, their -hipbones were enough like ours so that they must have stood erect. -There is no good reason to think they couldnt have walked as we do. - - -BRAINS, HANDS, AND TOOLS - -Whether the australopithecines were our ancestors or not, the proper -ancestors of men must have been able to stand erect and to walk on -their two feet. Three further important things probably were involved, -next, before they could become men proper. These are: - - 1. The increasing size and development of the brain. - - 2. The increasing usefulness (specialization) of the thumb and hand. - - 3. The use of tools. - -Nobody knows which of these three is most important, or which came -first. Most probably the growth of all three things was very much -blended together. If you think about each of the things, you will see -what I mean. Unless your hand is more flexible than a paw, and your -thumb will work against (or oppose) your fingers, you cant hold a tool -very well. But you wouldnt get the idea of using a tool unless you had -enough brain to help you see cause and effect. And it is rather hard to -see how your hand and brain would develop unless they had something to -practice on--like using tools. In Professor Krogmans words, the hand -must become the obedient servant of the eye and the brain. It is the -_co-ordination_ of these things that counts. - -Many other things must have been happening to the bodies of the -creatures who were the ancestors of men. Our ancestors had to develop -organs of speech. More than that, they had to get the idea of letting -_certain sounds_ made with these speech organs have _certain meanings_. - -All this must have gone very slowly. Probably everything was developing -little by little, all together. Men became men very slowly. - - -WHEN SHALL WE CALL MEN MEN? - -What do I mean when I say men? People who looked pretty much as we -do, and who used different tools to do different things, are men to me. -Well probably never know whether the earliest ones talked or not. They -probably had vocal cords, so they could make sounds, but did they know -how to make sounds work as symbols to carry meanings? But if the fossil -bones look like our skeletons, and if we find tools which well agree -couldnt have been made by nature or by animals, then Id say we had -traces of _men_. - -The australopithecine finds of the Transvaal and Bechuanaland, in -south Africa, are bound to come into the discussion here. Ive already -told you that the australopithecines could have stood upright and -walked on their two hind legs. They come from the very base of the -Pleistocene or Ice Age, and a few coarse stone tools have been found -with the australopithecine fossils. But there are three varieties -of the australopithecines and they last on until a time equal to -that of the second alpine glaciation. They are the best suggestion -we have yet as to what the ancestors of men _may_ have looked like. -They were certainly closer to men than to apes. Although their brain -size was no larger than the brains of modern apes their body size and -stature were quite small; hence, relative to their small size, their -brains were large. We have not been able to prove without doubt that -the australopithecines were _tool-making_ creatures, even though the -recent news has it that tools have been found with australopithecine -bones. The doubt as to whether the australopithecines used the tools -themselves goes like this--just suppose some man-like creature (whose -bones we have not yet found) made the tools and used them to kill -and butcher australopithecines. Hence a few experts tend to let -australopithecines still hang in limbo as man-apes. - - -THE EARLIEST MEN WE KNOW - -Ill postpone talking about the tools of early men until the next -chapter. The men whose bones were the earliest of the Java lot have -been given the name _Meganthropus_. The bones are very fragmentary. We -would not understand them very well unless we had the somewhat later -Javanese lot--the more commonly known _Pithecanthropus_ or Java -man--against which to refer them for study. One of the less well-known -and earliest fragments, a piece of lower jaw and some teeth, rather -strongly resembles the lower jaws and teeth of the australopithecine -type. Was _Meganthropus_ a sort of half-way point between the -australopithecines and _Pithecanthropus_? It is still too early to say. -We shall need more finds before we can be definite one way or the other. - -Java man, _Pithecanthropus_, comes from geological beds equal in age -to the latter part of the second alpine glaciation; the _Meganthropus_ -finds refer to beds of the beginning of this glaciation. The first -finds of Java man were made in 1891-92 by Dr. Eugene Dubois, a Dutch -doctor in the colonial service. Finds have continued to be made. There -are now bones enough to account for four skulls. There are also four -jaws and some odd teeth and thigh bones. Java man, generally speaking, -was about five feet six inches tall, and didnt hold his head very -erect. His skull was very thick and heavy and had room for little more -than two-thirds as large a brain as we have. He had big teeth and a big -jaw and enormous eyebrow ridges. - -No tools were found in the geological deposits where bones of Java man -appeared. There are some tools in the same general area, but they come -a bit later in time. One reason we accept the Java man as man--aside -from his general anatomical appearance--is that these tools probably -belonged to his near descendants. - -Remember that there are several varieties of men in the whole early -Java lot, at least two of which are earlier than the _Pithecanthropus_, -Java man. Some of the earlier ones seem to have gone in for -bigness, in tooth-size at least. _Meganthropus_ is one of these -earlier varieties. As we said, he _may_ turn out to be a link to -the australopithecines, who _may_ or _may not_ be ancestral to men. -_Meganthropus_ is best understandable in terms of _Pithecanthropus_, -who appeared later in the same general area. _Pithecanthropus_ is -pretty well understandable from the bones he left us, and also because -of his strong resemblance to the fully tool-using cave-dwelling Peking -man, _Sinanthropus_, about whom we shall talk next. But you can see -that the physical anthropologists and prehistoric archeologists still -have a lot of work to do on the problem of earliest men. - - -PEKING MEN AND SOME EARLY WESTERNERS - -The earliest known Chinese are called _Sinanthropus_, or Peking man, -because the finds were made near that city. In World War II, the United -States Marine guard at our Embassy in Peking tried to help get the -bones out of the city before the Japanese attack. Nobody knows where -these bones are now. The Red Chinese accuse us of having stolen them. -They were last seen on a dock-side at a Chinese port. But should you -catch a Marine with a sack of old bones, perhaps we could achieve peace -in Asia by returning them! Fortunately, there is a complete set of -casts of the bones. - -Peking man lived in a cave in a limestone hill, made tools, cracked -animal bones to get the marrow out, and used fire. Incidentally, the -bones of Peking man were found because Chinese dig for what they call -dragon bones and dragon teeth. Uneducated Chinese buy these things -in their drug stores and grind them into powder for medicine. The -dragon teeth and bones are really fossils of ancient animals, and -sometimes of men. The people who supply the drug stores have learned -where to dig for strange bones and teeth. Paleontologists who get to -China go to the drug stores to buy fossils. In a roundabout way, this -is how the fallen-in cave of Peking man at Choukoutien was discovered. - -Peking man was not quite as tall as Java man but he probably stood -straighter. His skull looked very much like that of the Java skull -except that it had room for a slightly larger brain. His face was less -brutish than was Java mans face, but this isnt saying much. - -Peking man dates from early in the interglacial period following the -second alpine glaciation. He probably lived close to 350,000 years -ago. There are several finds to account for in Europe by about this -time, and one from northwest Africa. The very large jawbone found -near Heidelberg in Germany is doubtless even earlier than Peking man. -The beds where it was found are of second alpine glacial times, and -recently some tools have been said to have come from the same beds. -There is not much I need tell you about the Heidelberg jaw save that it -seems certainly to have belonged to an early man, and that it is very -big. - -Another find in Germany was made at Steinheim. It consists of the -fragmentary skull of a man. It is very important because of its -relative completeness, but it has not yet been fully studied. The bone -is thick, but the back of the head is neither very low nor primitive, -and the face is also not primitive. The forehead does, however, have -big ridges over the eyes. The more fragmentary skull from Swanscombe in -England (p. 11) has been much more carefully studied. Only the top and -back of that skull have been found. Since the skull rounds up nicely, -it has been assumed that the face and forehead must have been quite -modern. Careful comparison with Steinheim shows that this was not -necessarily so. This is important because it bears on the question of -how early truly modern man appeared. - -Recently two fragmentary jaws were found at Ternafine in Algeria, -northwest Africa. They look like the jaws of Peking man. Tools were -found with them. Since no jaws have yet been found at Steinheim or -Swanscombe, but the time is the same, one wonders if these people had -jaws like those of Ternafine. - - -WHAT HAPPENED TO JAVA AND PEKING MEN - -Professor Weidenreich thought that there were at least a dozen ways in -which the Peking man resembled the modern Mongoloids. This would seem -to indicate that Peking man was really just a very early Chinese. - -Several later fossil men have been found in the Java-Australian area. -The best known of these is the so-called Solo man. There are some finds -from Australia itself which we now know to be quite late. But it looks -as if we may assume a line of evolution from Java man down to the -modern Australian natives. During parts of the Ice Age there was a land -bridge all the way from Java to Australia. - - -TWO ENGLISHMEN WHO WERENT OLD - -The older textbooks contain descriptions of two English finds which -were thought to be very old. These were called Piltdown (_Eoanthropus -dawsoni_) and Galley Hill. The skulls were very modern in appearance. -In 1948-49, British scientists began making chemical tests which proved -that neither of these finds is very old. It is now known that both -Piltdown man and the tools which were said to have been found with -him were part of an elaborate fake! - - -TYPICAL CAVE MEN - -The next men we have to talk about are all members of a related group. -These are the Neanderthal group. Neanderthal man himself was found in -the Neander Valley, near Dsseldorf, Germany, in 1856. He was the first -human fossil to be recognized as such. - -[Illustration: PRINCIPAL KNOWN TYPES OF FOSSIL MEN - - CRO-MAGNON - NEANDERTHAL - MODERN SKULL - COMBE-CAPELLE - SINANTHROPUS - PITHECANTHROPUS] - -Some of us think that the neanderthaloids proper are only those people -of western Europe who didnt get out before the beginning of the last -great glaciation, and who found themselves hemmed in by the glaciers -in the Alps and northern Europe. Being hemmed in, they intermarried -a bit too much and developed into a special type. Professor F. Clark -Howell sees it this way. In Europe, the earliest trace of men we -now know is the Heidelberg jaw. Evolution continued in Europe, from -Heidelberg through the Swanscombe and Steinheim types to a group of -pre-neanderthaloids. There are traces of these pre-neanderthaloids -pretty much throughout Europe during the third interglacial period--say -100,000 years ago. The pre-neanderthaloids are represented by such -finds as the ones at Ehringsdorf in Germany and Saccopastore in Italy. -I wont describe them for you, since they are simply less extreme than -the neanderthaloids proper--about half way between Steinheim and the -classic Neanderthal people. - -Professor Howell believes that the pre-neanderthaloids who happened to -get caught in the pocket of the southwest corner of Europe at the onset -of the last great glaciation became the classic Neanderthalers. Out in -the Near East, Howell thinks, it is possible to see traces of people -evolving from the pre-neanderthaloid type toward that of fully modern -man. Certainly, we dont see such extreme cases of neanderthaloidism -outside of western Europe. - -There are at least a dozen good examples in the main or classic -Neanderthal group in Europe. They date to just before and in the -earlier part of the last great glaciation (85,000 to 40,000 years ago). -Many of the finds have been made in caves. The cave men the movies -and the cartoonists show you are probably meant to be Neanderthalers. -Im not at all sure they dragged their women by the hair; the women -were probably pretty tough, too! - -Neanderthal men had large bony heads, but plenty of room for brains. -Some had brain cases even larger than the average for modern man. Their -faces were heavy, and they had eyebrow ridges of bone, but the ridges -were not as big as those of Java man. Their foreheads were very low, -and they didnt have much chin. They were about five feet three inches -tall, but were heavy and barrel-chested. But the Neanderthalers didnt -slouch as much as theyve been blamed for, either. - -One important thing about the Neanderthal group is that there is a fair -number of them to study. Just as important is the fact that we know -something about how they lived, and about some of the tools they made. - - -OTHER MEN CONTEMPORARY WITH THE NEANDERTHALOIDS - -We have seen that the neanderthaloids seem to be a specialization -in a corner of Europe. What was going on elsewhere? We think that -the pre-neanderthaloid type was a generally widespread form of men. -From this type evolved other more or less extreme although generally -related men. The Solo finds in Java form one such case. Another was the -Rhodesian man of Africa, and the more recent Hopefield finds show more -of the general Rhodesian type. It is more confusing than it needs to be -if these cases outside western Europe are called neanderthaloids. They -lived during the same approximate time range but they were all somewhat -different-looking people. - - -EARLY MODERN MEN - -How early is modern man (_Homo sapiens_), the wise man? Some people -have thought that he was very early, a few still think so. Piltdown -and Galley Hill, which were quite modern in anatomical appearance and -_supposedly_ very early in date, were the best evidence for very -early modern men. Now that Piltdown has been liquidated and Galley Hill -is known to be very late, what is left of the idea? - -The backs of the skulls of the Swanscombe and Steinheim finds look -rather modern. Unless you pay attention to the face and forehead of the -Steinheim find--which not many people have--and perhaps also consider -the Ternafine jaws, you might come to the conclusion that the crown of -the Swanscombe head was that of a modern-like man. - -Two more skulls, again without faces, are available from a French -cave site, Fontchevade. They come from the time of the last great -interglacial, as did the pre-neanderthaloids. The crowns of the -Fontchevade skulls also look quite modern. There is a bit of the -forehead preserved on one of these skulls and the brow-ridge is not -heavy. Nevertheless, there is a suggestion that the bones belonged to -an immature individual. In this case, his (or even more so, if _her_) -brow-ridges would have been weak anyway. The case for the Fontchevade -fossils, as modern type men, is little stronger than that for -Swanscombe, although Professor Vallois believes it a good case. - -It seems to add up to the fact that there were people living in -Europe--before the classic neanderthaloids--who looked more modern, -in some features, than the classic western neanderthaloids did. Our -best suggestion of what men looked like--just before they became fully -modern--comes from a cave on Mount Carmel in Palestine. - - -THE FIRST MODERNS - -Professor T. D. McCown and the late Sir Arthur Keith, who studied the -Mount Carmel bones, figured out that one of the two groups involved -was as much as 70 per cent modern. There were, in fact, two groups or -varieties of men in the Mount Carmel caves and in at least two other -Palestinian caves of about the same time. The time would be about that -of the onset of colder weather, when the last glaciation was beginning -in the north--say 75,000 years ago. - -The 70 per cent modern group came from only one cave, Mugharet es-Skhul -(cave of the kids). The other group, from several caves, had bones of -men of the type weve been calling pre-neanderthaloid which we noted -were widespread in Europe and beyond. The tools which came with each -of these finds were generally similar, and McCown and Keith, and other -scholars since their study, have tended to assume that both the Skhul -group and the pre-neanderthaloid group came from exactly the same time. -The conclusion was quite natural: here was a population of men in the -act of evolving in two different directions. But the time may not be -exactly the same. It is very difficult to be precise, within say 10,000 -years, for a time some 75,000 years ago. If the Skhul men are in fact -later than the pre-neanderthaloid group of Palestine, as some of us -think, then they show how relatively modern some men were--men who -lived at the same time as the classic Neanderthalers of the European -pocket. - -Soon after the first extremely cold phase of the last glaciation, we -begin to get a number of bones of completely modern men in Europe. -We also get great numbers of the tools they made, and their living -places in caves. Completely modern skeletons begin turning up in caves -dating back to toward 40,000 years ago. The time is about that of the -beginning of the second phase of the last glaciation. These skeletons -belonged to people no different from many people we see today. Like -people today, not everybody looked alike. (The positions of the more -important fossil men of later Europe are shown in the chart on page -72.) - - -DIFFERENCES IN THE EARLY MODERNS - -The main early European moderns have been divided into two groups, the -Cro-Magnon group and the Combe Capelle-Brnn group. Cro-Magnon people -were tall and big-boned, with large, long, and rugged heads. They -must have been built like many present-day Scandinavians. The Combe -Capelle-Brnn people were shorter; they had narrow heads and faces, and -big eyebrow-ridges. Of course we dont find the skin or hair of these -people. But there is little doubt they were Caucasoids (Whites). - -Another important find came in the Italian Riviera, near Monte Carlo. -Here, in a cave near Grimaldi, there was a grave containing a woman -and a young boy, buried together. The two skeletons were first called -Negroid because some features of their bones were thought to resemble -certain features of modern African Negro bones. But more recently, -Professor E. A. Hooton and other experts questioned the use of the word -Negroid in describing the Grimaldi skeletons. It is true that nothing -is known of the skin color, hair form, or any other fleshy feature of -the Grimaldi people, so that the word Negroid in its usual meaning is -not proper here. It is also not clear whether the features of the bones -claimed to be Negroid are really so at all. - -From a place called Wadjak, in Java, we have proto-Australoid skulls -which closely resemble those of modern Australian natives. Some of -the skulls found in South Africa, especially the Boskop skull, look -like those of modern Bushmen, but are much bigger. The ancestors of -the Bushmen seem to have once been very widespread south of the Sahara -Desert. True African Negroes were forest people who apparently expanded -out of the west central African area only in the last several thousand -years. Although dark in skin color, neither the Australians nor the -Bushmen are Negroes; neither the Wadjak nor the Boskop skulls are -Negroid. - -As weve already mentioned, Professor Weidenreich believed that Peking -man was already on the way to becoming a Mongoloid. Anyway, the -Mongoloids would seem to have been present by the time of the Upper -Cave at Choukoutien, the _Sinanthropus_ find-spot. - - -WHAT THE DIFFERENCES MEAN - -What does all this difference mean? It means that, at one moment in -time, within each different area, men tended to look somewhat alike. -From area to area, men tended to look somewhat different, just as -they do today. This is all quite natural. People _tended_ to mate -near home; in the anthropological jargon, they made up geographically -localized breeding populations. The simple continental division of -stocks--black = Africa, yellow = Asia, white = Europe--is too simple -a picture to fit the facts. People became accustomed to life in some -particular area within a continent (we might call it a natural area). -As they went on living there, they evolved towards some particular -physical variety. It would, of course, have been difficult to draw -a clear boundary between two adjacent areas. There must always have -been some mating across the boundaries in every case. One thing human -beings dont do, and never have done, is to mate for purity. It is -self-righteous nonsense when we try to kid ourselves into thinking that -they do. - -I am not going to struggle with the whole business of modern stocks and -races. This is a book about prehistoric men, not recent historic or -modern men. My physical anthropologist friends have been very patient -in helping me to write and rewrite this chapter--I am not going to -break their patience completely. Races are their business, not mine, -and they must do the writing about races. I shall, however, give two -modern definitions of race, and then make one comment. - - Dr. William G. Boyd, professor of Immunochemistry, School of - Medicine, Boston University: We may define a human race as a - population which differs significantly from other human populations - in regard to the frequency of one or more of the genes it - possesses. - - Professor Sherwood L. Washburn, professor of Physical Anthropology, - Department of Anthropology, the University of California: A race - is a group of genetically similar populations, and races intergrade - because there are always intermediate populations. - -My comment is that the ideas involved here are all biological: they -concern groups, _not_ individuals. Boyd and Washburn may differ a bit -on what they want to consider a population, but a population is a -group nevertheless, and genetics is biology to the hilt. Now a lot of -people still think of race in terms of how people dress or fix their -food or of other habits or customs they have. The next step is to talk -about racial purity. None of this has anything whatever to do with -race proper, which is a matter of the biology of groups. - -Incidentally, Im told that if man very carefully _controls_ -the breeding of certain animals over generations--dogs, cattle, -chickens--he might achieve a pure race of animals. But he doesnt do -it. Some unfortunate genetic trait soon turns up, so this has just as -carefully to be bred out again, and so on. - - -SUMMARY OF PRESENT KNOWLEDGE OF FOSSIL MEN - -The earliest bones of men we now have--upon which all the experts -would probably agree--are those of _Meganthropus_, from Java, of about -450,000 years ago. The earlier australopithecines of Africa were -possibly not tool-users and may not have been ancestral to men at all. -But there is an alternate and evidently increasingly stronger chance -that some of them may have been. The Kanam jaw from Kenya, another -early possibility, is not only very incomplete but its find-spot is -very questionable. - -Java man proper, _Pithecanthropus_, comes next, at about 400,000 years -ago, and the big Heidelberg jaw in Germany must be of about the same -date. Next comes Swanscombe in England, Steinheim in Germany, the -Ternafine jaws in Algeria, and Peking man, _Sinanthropus_. They all -date to the second great interglacial period, about 350,000 years ago. - -Piltdown and Galley Hill are out, and with them, much of the starch -in the old idea that there were two distinct lines of development -in human evolution: (1) a line of paleoanthropic development from -Heidelberg to the Neanderthalers where it became extinct, and (2) a -very early modern line, through Piltdown, Galley Hill, Swanscombe, to -us. Swanscombe, Steinheim, and Ternafine are just as easily cases of -very early pre-neanderthaloids. - -The pre-neanderthaloids were very widespread during the third -interglacial: Ehringsdorf, Saccopastore, some of the Mount Carmel -people, and probably Fontchevade are cases in point. A variety of -their descendants can be seen, from Java (Solo), Africa (Rhodesian -man), and about the Mediterranean and in western Europe. As the acute -cold of the last glaciation set in, the western Europeans found -themselves surrounded by water, ice, or bitter cold tundra. To vastly -over-simplify it, they bred in and became classic neanderthaloids. -But on Mount Carmel, the Skhul cave-find with its 70 per cent modern -features shows what could happen elsewhere at the same time. - -Lastly, from about 40,000 or 35,000 years ago--the time of the onset -of the second phase of the last glaciation--we begin to find the fully -modern skeletons of men. The modern skeletons differ from place to -place, just as different groups of men living in different places still -look different. - -What became of the Neanderthalers? Nobody can tell me for sure. Ive a -hunch they were simply bred out again when the cold weather was over. -Many Americans, as the years go by, are no longer ashamed to claim they -have Indian blood in their veins. Give us a few more generations -and there will not be very many other Americans left to whom we can -brag about it. It certainly isnt inconceivable to me to imagine a -little Cro-Magnon boy bragging to his friends about his tough, strong, -Neanderthaler great-great-great-great-grandfather! - - - - -Cultural BEGINNINGS - -[Illustration] - - -Men, unlike the lower animals, are made up of much more than flesh and -blood and bones; for men have culture. - - -WHAT IS CULTURE? - -Culture is a word with many meanings. The doctors speak of making a -culture of a certain kind of bacteria, and ants are said to have a -culture. Then there is the Emily Post kind of culture--you say a -person is cultured, or that he isnt, depending on such things as -whether or not he eats peas with his knife. - -The anthropologists use the word too, and argue heatedly over its finer -meanings; but they all agree that every human being is part of or has -some kind of culture. Each particular human group has a particular -culture; that is one of the ways in which we can tell one group of -men from another. In this sense, a CULTURE means the way the members -of a group of people think and believe and live, the tools they make, -and the way they do things. Professor Robert Redfield says a culture -is an organized or formalized body of conventional understandings. -Conventional understandings means the whole set of rules, beliefs, -and standards which a group of people lives by. These understandings -show themselves in art, and in the other things a people may make and -do. The understandings continue to last, through tradition, from one -generation to another. They are what really characterize different -human groups. - - -SOME CHARACTERISTICS OF CULTURE - -A culture lasts, although individual men in the group die off. On -the other hand, a culture changes as the different conventions and -understandings change. You could almost say that a culture lives in the -minds of the men who have it. But people are not born with it; they -get it as they grow up. Suppose a day-old Hungarian baby is adopted by -a family in Oshkosh, Wisconsin, and the child is not told that he is -Hungarian. He will grow up with no more idea of Hungarian culture than -anyone else in Oshkosh. - -So when I speak of ancient Egyptian culture, I mean the whole body -of understandings and beliefs and knowledge possessed by the ancient -Egyptians. I mean their beliefs as to why grain grew, as well as their -ability to make tools with which to reap the grain. I mean their -beliefs about life after death. What I am thinking about as culture is -a thing which lasted in time. If any one Egyptian, even the Pharaoh, -died, it didnt affect the Egyptian culture of that particular moment. - - -PREHISTORIC CULTURES - -For that long period of mans history that is all prehistory, we have -no written descriptions of cultures. We find only the tools men made, -the places where they lived, the graves in which they buried their -dead. Fortunately for us, these tools and living places and graves all -tell us something about the ways these men lived and the things they -believed. But the story we learn of the very early cultures must be -only a very small part of the whole, for we find so few things. The -rest of the story is gone forever. We have to do what we can with what -we find. - -For all of the time up to about 75,000 years ago, which was the time -of the classic European Neanderthal group of men, we have found few -cave-dwelling places of very early prehistoric men. First, there is the -fallen-in cave where Peking man was found, near Peking. Then there are -two or three other _early_, but not _very early_, possibilities. The -finds at the base of the French cave of Fontchevade, those in one of -the Makapan caves in South Africa, and several open sites such as Dr. -L. S. B. Leakeys Olorgesailie in Kenya doubtless all lie earlier than -the time of the main European Neanderthal group, but none are so early -as the Peking finds. - -You can see that we know very little about the home life of earlier -prehistoric men. We find different kinds of early stone tools, but we -cant even be really sure which tools may have been used together. - - -WHY LITTLE HAS LASTED FROM EARLY TIMES - -Except for the rare find-spots mentioned above, all our very early -finds come from geological deposits, or from the wind-blown surfaces -of deserts. Here is what the business of geological deposits really -means. Let us say that a group of people was living in England about -300,000 years ago. They made the tools they needed, lived in some sort -of camp, almost certainly built fires, and perhaps buried their dead. -While the climate was still warm, many generations may have lived in -the same place, hunting, and gathering nuts and berries; but after some -few thousand years, the weather began very gradually to grow colder. -These early Englishmen would not have known that a glacier was forming -over northern Europe. They would only have noticed that the animals -they hunted seemed to be moving south, and that the berries grew larger -toward the south. So they would have moved south, too. - -The camp site they left is the place we archeologists would really have -liked to find. All of the different tools the people used would have -been there together--many broken, some whole. The graves, and traces -of fire, and the tools would have been there. But the glacier got -there first! The front of this enormous sheet of ice moved down over -the country, crushing and breaking and plowing up everything, like a -gigantic bulldozer. You can see what happened to our camp site. - -Everything the glacier couldnt break, it pushed along in front of it -or plowed beneath it. Rocks were ground to gravel, and soil was caught -into the ice, which afterwards melted and ran off as muddy water. Hard -tools of flint sometimes remained whole. Human bones werent so hard; -its a wonder _any_ of them lasted. Gushing streams of melt water -flushed out the debris from underneath the glacier, and water flowed -off the surface and through great crevasses. The hard materials these -waters carried were even more rolled and ground up. Finally, such -materials were dropped by the rushing waters as gravels, miles from -the front of the glacier. At last the glacier reached its greatest -extent; then it melted backward toward the north. Debris held in the -ice was dropped where the ice melted, or was flushed off by more melt -water. When the glacier, leaving the land, had withdrawn to the sea, -great hunks of ice were broken off as icebergs. These icebergs probably -dropped the materials held in their ice wherever they floated and -melted. There must be many tools and fragmentary bones of prehistoric -men on the bottom of the Atlantic Ocean and the North Sea. - -Remember, too, that these glaciers came and went at least three or four -times during the Ice Age. Then you will realize why the earlier things -we find are all mixed up. Stone tools from one camp site got mixed up -with stone tools from many other camp sites--tools which may have been -made tens of thousands or more years apart. The glaciers mixed them -all up, and so we cannot say which particular sets of tools belonged -together in the first place. - - -EOLITHS - -But what sort of tools do we find earliest? For almost a century, -people have been picking up odd bits of flint and other stone in the -oldest Ice Age gravels in England and France. It is now thought these -odd bits of stone werent actually worked by prehistoric men. The -stones were given a name, _eoliths_, or dawn stones. You can see them -in many museums; but you can be pretty sure that very few of them were -actually fashioned by men. - -It is impossible to pick out eoliths that seem to be made in any -one _tradition_. By tradition I mean a set of habits for making one -kind of tool for some particular job. No two eoliths look very much -alike: tools made as part of some one tradition all look much alike. -Now its easy to suppose that the very earliest prehistoric men picked -up and used almost any sort of stone. This wouldnt be surprising; you -and I do it when we go camping. In other words, some of these eoliths -may actually have been used by prehistoric men. They must have used -anything that might be handy when they needed it. We could have figured -that out without the eoliths. - - -THE ROAD TO STANDARDIZATION - -Reasoning from what we know or can easily imagine, there should have -been three major steps in the prehistory of tool-making. The first step -would have been simple _utilization_ of what was at hand. This is the -step into which the eoliths would fall. The second step would have -been _fashioning_--the haphazard preparation of a tool when there was a -need for it. Probably many of the earlier pebble tools, which I shall -describe next, fall into this group. The third step would have been -_standardization_. Here, men began to make tools according to certain -set traditions. Counting the better-made pebble tools, there are four -such traditions or sets of habits for the production of stone tools in -earliest prehistoric times. Toward the end of the Pleistocene, a fifth -tradition appears. - - -PEBBLE TOOLS - -At the beginning of the last chapter, youll remember that I said there -were tools from very early geological beds. The earliest bones of men -have not yet been found in such early beds although the Sterkfontein -australopithecine cave approaches this early date. The earliest tools -come from Africa. They date back to the time of the first great -alpine glaciation and are at least 500,000 years old. The earliest -ones are made of split pebbles, about the size of your fist or a bit -bigger. They go under the name of pebble tools. There are many natural -exposures of early Pleistocene geological beds in Africa, and the -prehistoric archeologists of south and central Africa have concentrated -on searching for early tools. Other finds of early pebble tools have -recently been made in Algeria and Morocco. - -[Illustration: SOUTH AFRICAN PEBBLE TOOL] - -There are probably early pebble tools to be found in areas of the -Old World besides Africa; in fact, some prehistorians already claim -to have identified a few. Since the forms and the distinct ways of -making the earlier pebble tools had not yet sufficiently jelled into -a set tradition, they are difficult for us to recognize. It is not -so difficult, however, if there are great numbers of possibles -available. A little later in time the tradition becomes more clearly -set, and pebble tools are easier to recognize. So far, really large -collections of pebble tools have only been found and examined in Africa. - - -CORE-BIFACE TOOLS - -The next tradition well look at is the _core_ or biface one. The tools -are large pear-shaped pieces of stone trimmed flat on the two opposite -sides or faces. Hence biface has been used to describe these tools. -The front view is like that of a pear with a rather pointed top, and -the back view looks almost exactly the same. Look at them side on, and -you can see that the front and back faces are the same and have been -trimmed to a thin tip. The real purpose in trimming down the two faces -was to get a good cutting edge all around. You can see all this in the -illustration. - -[Illustration: ABBEVILLIAN BIFACE] - -We have very little idea of the way in which these core-bifaces were -used. They have been called hand axes, but this probably gives the -wrong idea, for an ax, to us, is not a pointed tool. All of these early -tools must have been used for a number of jobs--chopping, scraping, -cutting, hitting, picking, and prying. Since the core-bifaces tend to -be pointed, it seems likely that they were used for hitting, picking, -and prying. But they have rough cutting edges, so they could have been -used for chopping, scraping, and cutting. - - -FLAKE TOOLS - -The third tradition is the _flake_ tradition. The idea was to get a -tool with a good cutting edge by simply knocking a nice large flake off -a big block of stone. You had to break off the flake in such a way that -it was broad and thin, and also had a good sharp cutting edge. Once you -really got on to the trick of doing it, this was probably a simpler way -to make a good cutting tool than preparing a biface. You have to know -how, though; Ive tried it and have mashed my fingers more than once. - -The flake tools look as if they were meant mainly for chopping, -scraping, and cutting jobs. When one made a flake tool, the idea seems -to have been to produce a broad, sharp, cutting edge. - -[Illustration: CLACTONIAN FLAKE] - -The core-biface and the flake traditions were spread, from earliest -times, over much of Europe, Africa, and western Asia. The map on page -52 shows the general area. Over much of this great region there was -flint. Both of these traditions seem well adapted to flint, although -good core-bifaces and flakes were made from other kinds of stone, -especially in Africa south of the Sahara. - - -CHOPPERS AND ADZE-LIKE TOOLS - -The fourth early tradition is found in southern and eastern Asia, from -northwestern India through Java and Burma into China. Father Maringer -recently reported an early group of tools in Japan, which most resemble -those of Java, called Patjitanian. The prehistoric men in this general -area mostly used quartz and tuff and even petrified wood for their -stone tools (see illustration, p. 46). - -This fourth early tradition is called the _chopper-chopping tool_ -tradition. It probably has its earliest roots in the pebble tool -tradition of African type. There are several kinds of tools in this -tradition, but all differ from the western core-bifaces and flakes. -There are broad, heavy scrapers or cleavers, and tools with an -adze-like cutting edge. These last-named tools are called hand adzes, -just as the core-bifaces of the west have often been called hand -axes. The section of an adze cutting edge is ? shaped; the section of -an ax is < shaped. - -[Illustration: ANYATHIAN ADZE-LIKE TOOL] - -There are also pointed pebble tools. Thus the tool kit of these early -south and east Asiatic peoples seems to have included tools for doing -as many different jobs as did the tools of the Western traditions. - -Dr. H. L. Movius has emphasized that the tools which were found in the -Peking cave with Peking man belong to the chopper-tool tradition. This -is the only case as yet where the tools and the man have been found -together from very earliest times--if we except Sterkfontein. - - -DIFFERENCES WITHIN THE TOOL-MAKING TRADITIONS - -The latter three great traditions in the manufacture of stone -tools--and the less clear-cut pebble tools before them--are all we have -to show of the cultures of the men of those times. Changes happened in -each of the traditions. As time went on, the tools in each tradition -were better made. There could also be slight regional differences in -the tools within one tradition. Thus, tools with small differences, but -all belonging to one tradition, can be given special group (facies) -names. - -This naming of special groups has been going on for some time. Here are -some of these names, since you may see them used in museum displays -of flint tools, or in books. Within each tradition of tool-making -(save the chopper tools), the earliest tool type is at the bottom -of the list, just as it appears in the lowest beds of a geological -stratification.[3] - - [3] Archeologists usually make their charts and lists with the - earliest materials at the bottom and the latest on top, since - this is the way they find them in the ground. - - Chopper tool (all about equally early): - Anyathian (Burma) - Choukoutienian (China) - Patjitanian (Java) - Soan (India) - - Flake: - Typical Mousterian - Levalloiso-Mousterian - Levalloisian - Tayacian - Clactonian (localized in England) - - Core-biface: - Some blended elements in Mousterian - Micoquian (= Acheulean 6 and 7) - Acheulean - Abbevillian (once called Chellean) - - Pebble tool: - Oldowan - Ain Hanech - pre-Stellenbosch - Kafuan - -The core-biface and the flake traditions appear in the chart (p. 65). - -The early archeologists had many of the tool groups named before they -ever realized that there were broader tool preparation traditions. This -was understandable, for in dealing with the mixture of things that come -out of glacial gravels the easiest thing to do first is to isolate -individual types of tools into groups. First you put a bushel-basketful -of tools on a table and begin matching up types. Then you give names to -the groups of each type. The groups and the types are really matters of -the archeologists choice; in real life, they were probably less exact -than the archeologists lists of them. We now know pretty well in which -of the early traditions the various early groups belong. - - -THE MEANING OF THE DIFFERENT TRADITIONS - -What do the traditions really mean? I see them as the standardization -of ways to make tools for particular jobs. We may not know exactly what -job the maker of a particular core-biface or flake tool had in mind. We -can easily see, however, that he already enjoyed a know-how, a set of -persistent habits of tool preparation, which would always give him the -same type of tool when he wanted to make it. Therefore, the traditions -show us that persistent habits already existed for the preparation of -one type of tool or another. - -This tells us that one of the characteristic aspects of human culture -was already present. There must have been, in the minds of these -early men, a notion of the ideal type of tool for a particular job. -Furthermore, since we find so many thousands upon thousands of tools -of one type or another, the notion of the ideal types of tools _and_ -the know-how for the making of each type must have been held in common -by many men. The notions of the ideal types and the know-how for their -production must have been passed on from one generation to another. - -I could even guess that the notions of the ideal type of one or the -other of these tools stood out in the minds of men of those times -somewhat like a symbol of perfect tool for good job. If this were -so--remember its only a wild guess of mine--then men were already -symbol users. Now lets go on a further step to the fact that the words -men speak are simply sounds, each different sound being a symbol for a -different meaning. If standardized tool-making suggests symbol-making, -is it also possible that crude word-symbols were also being made? I -suppose that it is not impossible. - -There may, of course, be a real question whether tool-utilizing -creatures--our first step, on page 42--were actually men. Other -animals utilize things at hand as tools. The tool-fashioning creature -of our second step is more suggestive, although we may not yet feel -sure that many of the earlier pebble tools were man-made products. But -with the step to standardization and the appearance of the traditions, -I believe we must surely be dealing with the traces of culture-bearing -_men_. The conventional understandings which Professor Redfields -definition of culture suggests are now evidenced for us in the -persistent habits for the preparation of stone tools. Were we able to -see the other things these prehistoric men must have made--in materials -no longer preserved for the archeologist to find--I believe there would -be clear signs of further conventional understandings. The men may have -been physically primitive and pretty shaggy in appearance, but I think -we must surely call them men. - - -AN OLDER INTERPRETATION OF THE WESTERN TRADITIONS - -In the last chapter, I told you that many of the older archeologists -and human paleontologists used to think that modern man was very old. -The supposed ages of Piltdown and Galley Hill were given as evidence -of the great age of anatomically modern man, and some interpretations -of the Swanscombe and Fontchevade fossils were taken to support -this view. The conclusion was that there were two parallel lines or -phyla of men already present well back in the Pleistocene. The -first of these, the more primitive or paleoanthropic line, was -said to include Heidelberg, the proto-neanderthaloids and classic -Neanderthal. The more anatomically modern or neanthropic line was -thought to consist of Piltdown and the others mentioned above. The -Neanderthaler or paleoanthropic line was thought to have become extinct -after the first phase of the last great glaciation. Of course, the -modern or neanthropic line was believed to have persisted into the -present, as the basis for the worlds population today. But with -Piltdown liquidated, Galley Hill known to be very late, and Swanscombe -and Fontchevade otherwise interpreted, there is little left of the -so-called parallel phyla theory. - -While the theory was in vogue, however, and as long as the European -archeological evidence was looked at in one short-sighted way, the -archeological materials _seemed_ to fit the parallel phyla theory. It -was simply necessary to believe that the flake tools were made only -by the paleoanthropic Neanderthaler line, and that the more handsome -core-biface tools were the product of the neanthropic modern-man line. - -Remember that _almost_ all of the early prehistoric European tools -came only from the redeposited gravel beds. This means that the tools -were not normally found in the remains of camp sites or work shops -where they had actually been dropped by the men who made and used -them. The tools came, rather, from the secondary hodge-podge of the -glacial gravels. I tried to give you a picture of the bulldozing action -of glaciers (p. 40) and of the erosion and weathering that were -side-effects of a glacially conditioned climate on the earths surface. -As we said above, if one simply plucks tools out of the redeposited -gravels, his natural tendency is to type the tools by groups, and to -think that the groups stand for something _on their own_. - -In 1906, M. Victor Commont actually made a rare find of what seems -to have been a kind of workshop site, on a terrace above the Somme -river in France. Here, Commont realized, flake tools appeared clearly -in direct association with core-biface tools. Few prehistorians paid -attention to Commont or his site, however. It was easier to believe -that flake tools represented a distinct culture and that this -culture was that of the Neanderthaler or paleoanthropic line, and -that the core-bifaces stood for another culture which was that of the -supposed early modern or neanthropic line. Of course, I am obviously -skipping many details here. Some later sites with Neanderthal fossils -do seem to have only flake tools, but other such sites have both types -of tools. The flake tools which appeared _with_ the core-bifaces -in the Swanscombe gravels were never made much of, although it -was embarrassing for the parallel phyla people that Fontchevade -ran heavily to flake tools. All in all, the parallel phyla theory -flourished because it seemed so neat and easy to understand. - - -TRADITIONS ARE TOOL-MAKING HABITS, NOT CULTURES - -In case you think I simply enjoy beating a dead horse, look in any -standard book on prehistory written twenty (or even ten) years ago, or -in most encyclopedias. Youll find that each of the individual tool -types, of the West, at least, was supposed to represent a culture. -The cultures were believed to correspond to parallel lines of human -evolution. - -In 1937, Mr. Harper Kelley strongly re-emphasized the importance -of Commonts workshop site and the presence of flake tools with -core-bifaces. Next followed Dr. Movius clear delineation of the -chopper-chopping tool tradition of the Far East. This spoiled the nice -symmetry of the flake-tool = paleoanthropic, core-biface = neanthropic -equations. Then came increasing understanding of the importance of -the pebble tools in Africa, and the location of several more workshop -sites there, especially at Olorgesailie in Kenya. Finally came the -liquidation of Piltdown and the deflation of Galley Hills date. So it -is at last possible to picture an individual prehistoric man making a -flake tool to do one job and a core-biface tool to do another. Commont -showed us this picture in 1906, but few believed him. - -[Illustration: DISTRIBUTION OF TOOL-PREPARATION TRADITIONS - -Time approximately 100,000 years ago] - -There are certainly a few cases in which flake tools did appear with -few or no core-bifaces. The flake-tool group called Clactonian in -England is such a case. Another good, but certainly later case is -that of the cave on Mount Carmel in Palestine, where the blended -pre-neanderthaloid, 70 per cent modern-type skulls were found. Here, in -the same level with the skulls, were 9,784 flint tools. Of these, only -three--doubtless strays--were core-bifaces; all the rest were flake -tools or flake chips. We noted above how the Fontchevade cave ran to -flake tools. The only conclusion I would draw from this is that times -and circumstances did exist in which prehistoric men needed only flake -tools. So they only made flake tools for those particular times and -circumstances. - - -LIFE IN EARLIEST TIMES - -What do we actually know of life in these earliest times? In the -glacial gravels, or in the terrace gravels of rivers once swollen by -floods of melt water or heavy rains, or on the windswept deserts, we -find stone tools. The earliest and coarsest of these are the pebble -tools. We do not yet know what the men who made them looked like, -although the Sterkfontein australopithecines probably give us a good -hint. Then begin the more formal tool preparation traditions of the -west--the core-bifaces and the flake tools--and the chopper-chopping -tool series of the farther east. There is an occasional roughly worked -piece of bone. From the gravels which yield the Clactonian flakes of -England comes the fire-hardened point of a wooden spear. There are -also the chance finds of the fossil human bones themselves, of which -we spoke in the last chapter. Aside from the cave of Peking man, none -of the earliest tools have been found in caves. Open air or workshop -sites which do not seem to have been disturbed later by some geological -agency are very rare. - -The chart on page 65 shows graphically what the situation in -west-central Europe seems to have been. It is not yet certain whether -there were pebble tools there or not. The Fontchevade cave comes -into the picture about 100,000 years ago or more. But for the earlier -hundreds of thousands of years--below the red-dotted line on the -chart--the tools we find come almost entirely from the haphazard -mixture within the geological contexts. - -The stone tools of each of the earlier traditions are the simplest -kinds of all-purpose tools. Almost any one of them could be used for -hacking, chopping, cutting, and scraping; so the men who used them must -have been living in a rough and ready sort of way. They found or hunted -their food wherever they could. In the anthropological jargon, they -were food-gatherers, pure and simple. - -Because of the mixture in the gravels and in the materials they -carried, we cant be sure which animals these men hunted. Bones of -the larger animals turn up in the gravels, but they could just as -well belong to the animals who hunted the men, rather than the other -way about. We dont know. This is why camp sites like Commonts and -Olorgesailie in Kenya are so important when we do find them. The animal -bones at Olorgesailie belonged to various mammals of extremely large -size. Probably they were taken in pit-traps, but there are a number of -groups of three round stones on the site which suggest that the people -used bolas. The South American Indians used three-ball bolas, with the -stones in separate leather bags connected by thongs. These were whirled -and then thrown through the air so as to entangle the feet of a fleeing -animal. - -Professor F. Clark Howell recently returned from excavating another -important open air site at Isimila in Tanganyika. The site yielded -the bones of many fossil animals and also thousands of core-bifaces, -flakes, and choppers. But Howells reconstruction of the food-getting -habits of the Isimila people certainly suggests that the word hunting -is too dignified for what they did; scavenging would be much nearer -the mark. - -During a great part of this time the climate was warm and pleasant. The -second interglacial period (the time between the second and third great -alpine glaciations) lasted a long time, and during much of this time -the climate may have been even better than ours is now. We dont know -that earlier prehistoric men in Europe or Africa lived in caves. They -may not have needed to; much of the weather may have been so nice that -they lived in the open. Perhaps they didnt wear clothes, either. - - -WHAT THE PEKING CAVE-FINDS TELL US - -The one early cave-dwelling we have found is that of Peking man, in -China. Peking man had fire. He probably cooked his meat, or used -the fire to keep dangerous animals away from his den. In the cave -were bones of dangerous animals, members of the wolf, bear, and cat -families. Some of the cat bones belonged to beasts larger than tigers. -There were also bones of other wild animals: buffalo, camel, deer, -elephants, horses, sheep, and even ostriches. Seventy per cent of the -animals Peking man killed were fallow deer. Its much too cold and dry -in north China for all these animals to live there today. So this list -helps us know that the weather was reasonably warm, and that there was -enough rain to grow grass for the grazing animals. The list also helps -the paleontologists to date the find. - -Peking man also seems to have eaten plant food, for there are hackberry -seeds in the debris of the cave. His tools were made of sandstone and -quartz and sometimes of a rather bad flint. As weve already seen, they -belong in the chopper-tool tradition. It seems fairly clear that some -of the edges were chipped by right-handed people. There are also many -split pieces of heavy bone. Peking man probably split them so he could -eat the bone marrow, but he may have used some of them as tools. - -Many of these split bones were the bones of Peking men. Each one of the -skulls had already had the base broken out of it. In no case were any -of the bones resting together in their natural relation to one another. -There is nothing like a burial; all of the bones are scattered. Now -its true that animals could have scattered bodies that were not cared -for or buried. But splitting bones lengthwise and carefully removing -the base of a skull call for both the tools and the people to use them. -Its pretty clear who the people were. Peking man was a cannibal. - - * * * * * - -This rounds out about all we can say of the life and times of early -prehistoric men. In those days life was rough. You evidently had to -watch out not only for dangerous animals but also for your fellow men. -You ate whatever you could catch or find growing. But you had sense -enough to build fires, and you had already formed certain habits for -making the kinds of stone tools you needed. Thats about all we know. -But I think well have to admit that cultural beginnings had been made, -and that these early people were really _men_. - - - - -MORE EVIDENCE of Culture - -[Illustration] - - -While the dating is not yet sure, the material that we get from caves -in Europe must go back to about 100,000 years ago; the time of the -classic Neanderthal group followed soon afterwards. We dont know why -there is no earlier material in the caves; apparently they were not -used before the last interglacial phase (the period just before the -last great glaciation). We know that men of the classic Neanderthal -group were living in caves from about 75,000 to 45,000 years ago. -New radioactive carbon dates even suggest that some of the traces of -culture well describe in this chapter may have lasted to about 35,000 -years ago. Probably some of the pre-neanderthaloid types of men had -also lived in caves. But we have so far found their bones in caves only -in Palestine and at Fontchevade. - - -THE CAVE LAYERS - -In parts of France, some peasants still live in caves. In prehistoric -time, many generations of people lived in them. As a result, many -caves have deep layers of debris. The first people moved in and lived -on the rock floor. They threw on the floor whatever they didnt want, -and they tracked in mud; nobody bothered to clean house in those days. -Their debris--junk and mud and garbage and what not--became packed -into a layer. As time went on, and generations passed, the layer grew -thicker. Then there might have been a break in the occupation of the -cave for a while. Perhaps the game animals got scarce and the people -moved away; or maybe the cave became flooded. Later on, other people -moved in and began making a new layer of their own on top of the first -layer. Perhaps this process of layering went on in the same cave for a -hundred thousand years; you can see what happened. The drawing on this -page shows a section through such a cave. The earliest layer is on the -bottom, the latest one on top. They go in order from bottom to top, -earliest to latest. This is the _stratification_ we talked about (p. -12). - -[Illustration: SECTION OF SHELTER ON LOWER TERRACE, LE MOUSTIER] - -While we may find a mix-up in caves, its not nearly as bad as the -mixing up that was done by glaciers. The animal bones and shells, the -fireplaces, the bones of men, and the tools the men made all belong -together, if they come from one layer. Thats the reason why the cave -of Peking man is so important. It is also the reason why the caves in -Europe and the Near East are so important. We can get an idea of which -things belong together and which lot came earliest and which latest. - -In most cases, prehistoric men lived only in the mouths of caves. -They didnt like the dark inner chambers as places to live in. They -preferred rock-shelters, at the bases of overhanging cliffs, if there -was enough overhang to give shelter. When the weather was good, they no -doubt lived in the open air as well. Ill go on using the term cave -since its more familiar, but remember that I really mean rock-shelter, -as a place in which people actually lived. - -The most important European cave sites are in Spain, France, and -central Europe; there are also sites in England and Italy. A few caves -are known in the Near East and Africa, and no doubt more sites will be -found when the out-of-the-way parts of Europe, Africa, and Asia are -studied. - - -AN INDUSTRY DEFINED - -We have already seen that the earliest European cave materials are -those from the cave of Fontchevade. Movius feels certain that the -lowest materials here date back well into the third interglacial stage, -that which lay between the Riss (next to the last) and the Wrm I -(first stage of the last) alpine glaciations. This material consists -of an _industry_ of stone tools, apparently all made in the flake -tradition. This is the first time we have used the word industry. -It is useful to call all of the different tools found together in one -layer and made of _one kind of material_ an industry; that is, the -tools must be found together as men left them. Tools taken from the -glacial gravels (or from windswept desert surfaces or river gravels -or any geological deposit) are not together in this sense. We might -say the latter have only geological, not archeological context. -Archeological context means finding things just as men left them. We -can tell what tools go together in an industrial sense only if we -have archeological context. - -Up to now, the only things we could have called industries were the -worked stone industry and perhaps the worked (?) bone industry of the -Peking cave. We could add some of the very clear cases of open air -sites, like Olorgesailie. We couldnt use the term for the stone tools -from the glacial gravels, because we do not know which tools belonged -together. But when the cave materials begin to appear in Europe, we can -begin to speak of industries. Most of the European caves of this time -contain industries of flint tools alone. - - -THE EARLIEST EUROPEAN CAVE LAYERS - -Weve just mentioned the industry from what is said to be the oldest -inhabited cave in Europe; that is, the industry from the deepest layer -of the site at Fontchevade. Apparently it doesnt amount to much. The -tools are made of stone, in the flake tradition, and are very poorly -worked. This industry is called _Tayacian_. Its type tool seems to be -a smallish flake tool, but there are also larger flakes which seem to -have been fashioned for hacking. In fact, the type tool seems to be -simply a smaller edition of the Clactonian tool (pictured on p. 45). - -None of the Fontchevade tools are really good. There are scrapers, -and more or less pointed tools, and tools that may have been used -for hacking and chopping. Many of the tools from the earlier glacial -gravels are better made than those of this first industry we see in -a European cave. There is so little of this material available that -we do not know which is really typical and which is not. You would -probably find it hard to see much difference between this industry and -a collection of tools of the type called Clactonian, taken from the -glacial gravels, especially if the Clactonian tools were small-sized. - -The stone industry of the bottommost layer of the Mount Carmel cave, -in Palestine, where somewhat similar tools were found, has also been -called Tayacian. - -I shall have to bring in many unfamiliar words for the names of the -industries. The industries are usually named after the places where -they were first found, and since these were in most cases in France, -most of the names which follow will be of French origin. However, -the names have simply become handles and are in use far beyond the -boundaries of France. It would be better if we had a non-place-name -terminology, but archeologists have not yet been able to agree on such -a terminology. - - -THE ACHEULEAN INDUSTRY - -Both in France and in Palestine, as well as in some African cave -sites, the next layers in the deep caves have an industry in both the -core-biface and the flake traditions. The core-biface tools usually -make up less than half of all the tools in the industry. However, -the name of the biface type of tool is generally given to the whole -industry. It is called the _Acheulean_, actually a late form of it, as -Acheulean is also used for earlier core-biface tools taken from the -glacial gravels. In western Europe, the name used is _Upper Acheulean_ -or _Micoquian_. The same terms have been borrowed to name layers E and -F in the Tabun cave, on Mount Carmel in Palestine. - -The Acheulean core-biface type of tool is worked on two faces so as -to give a cutting edge all around. The outline of its front view may -be oval, or egg-shaped, or a quite pointed pear shape. The large -chip-scars of the Acheulean core-bifaces are shallow and flat. It is -suspected that this resulted from the removal of the chips with a -wooden club; the deep chip-scars of the earlier Abbevillian core-biface -came from beating the tool against a stone anvil. These tools are -really the best and also the final products of the core-biface -tradition. We first noticed the tradition in the early glacial gravels -(p. 43); now we see its end, but also its finest examples, in the -deeper cave levels. - -The flake tools, which really make up the greater bulk of this -industry, are simple scrapers and chips with sharp cutting edges. The -habits used to prepare them must have been pretty much the same as -those used for at least one of the flake industries we shall mention -presently. - -There is very little else in these early cave layers. We do not have -a proper industry of bone tools. There are traces of fire, and of -animal bones, and a few shells. In Palestine, there are many more -bones of deer than of gazelle in these layers; the deer lives in a -wetter climate than does the gazelle. In the European cave layers, the -animal bones are those of beasts that live in a warm climate. They -belonged in the last interglacial period. We have not yet found the -bones of fossil men definitely in place with this industry. - -[Illustration: ACHEULEAN BIFACE] - - -FLAKE INDUSTRIES FROM THE CAVES - -Two more stone industries--the _Levalloisian_ and the -_Mousterian_--turn up at approximately the same time in the European -cave layers. Their tools seem to be mainly in the flake tradition, -but according to some of the authorities their preparation also shows -some combination with the habits by which the core-biface tools were -prepared. - -Now notice that I dont tell you the Levalloisian and the Mousterian -layers are both above the late Acheulean layers. Look at the cave -section (p. 57) and youll find that some Mousterian of Acheulean -tradition appears above some typical Mousterian. This means that -there may be some kinds of Acheulean industries that are later than -some kinds of Mousterian. The same is true of the Levalloisian. - -There were now several different kinds of habits that men used in -making stone tools. These habits were based on either one or the other -of the two traditions--core-biface or flake--or on combinations of -the habits used in the preparation techniques of both traditions. All -were popular at about the same time. So we find that people who made -one kind of stone tool industry lived in a cave for a while. Then they -gave up the cave for some reason, and people with another industry -moved in. Then the first people came back--or at least somebody with -the same tool-making habits as the first people. Or maybe a third group -of tool-makers moved in. The people who had these different habits for -making their stone tools seem to have moved around a good deal. They no -doubt borrowed and exchanged tricks of the trade with each other. There -were no patent laws in those days. - -The extremely complicated interrelationships of the different habits -used by the tool-makers of this range of time are at last being -systematically studied. M. Franois Bordes has developed a statistical -method of great importance for understanding these tool preparation -habits. - - -THE LEVALLOISIAN AND MOUSTERIAN - -The easiest Levalloisian tool to spot is a big flake tool. The trick -in making it was to fashion carefully a big chunk of stone (called -the Levalloisian tortoise core, because it resembles the shape of -a turtle-shell) and then to whack this in such a way that a large -flake flew off. This large thin flake, with sharp cutting edges, is -the finished Levalloisian tool. There were various other tools in a -Levalloisian industry, but this is the characteristic _Levalloisian_ -tool. - -There are several typical Mousterian stone tools. Different from -the tools of the Levalloisian type, these were made from disc-like -cores. There are medium-sized flake side scrapers. There are also -some small pointed tools and some small hand axes. The last of these -tool types is often a flake worked on both of the flat sides (that -is, bifacially). There are also pieces of flint worked into the form -of crude balls. The pointed tools may have been fixed on shafts to -make short jabbing spears; the round flint balls may have been used as -bolas. Actually, we dont _know_ what either tool was used for. The -points and side scrapers are illustrated (pp. 64 and 66). - -[Illustration: LEVALLOIS FLAKE] - - -THE MIXING OF TRADITIONS - -Nowadays the archeologists are less and less sure of the importance -of any one specific tool type and name. Twenty years ago, they used -to speak simply of Acheulean or Levalloisian or Mousterian tools. -Now, more and more, _all_ of the tools from some one layer in a -cave are called an industry, which is given a mixed name. Thus we -have Levalloiso-Mousterian, and Acheuleo-Levalloisian, and even -Acheuleo-Mousterian (or Mousterian of Acheulean tradition). Bordes -systematic work is beginning to clear up some of our confusion. - -The time of these late Acheuleo-Levalloiso-Mousterioid industries -is from perhaps as early as 100,000 years ago. It may have lasted -until well past 50,000 years ago. This was the time of the first -phase of the last great glaciation. It was also the time that the -classic group of Neanderthal men was living in Europe. A number of -the Neanderthal fossil finds come from these cave layers. Before the -different habits of tool preparation were understood it used to be -popular to say Neanderthal man was Mousterian man. I think this is -wrong. What used to be called Mousterian is now known to be a variety -of industries with tools of both core-biface and flake habits, and -so mixed that the word Mousterian used alone really doesnt mean -anything. The Neanderthalers doubtless understood the tool preparation -habits by means of which Acheulean, Levalloisian and Mousterian type -tools were produced. We also have the more modern-like Mount Carmel -people, found in a cave layer of Palestine with tools almost entirely -in the flake tradition, called Levalloiso-Mousterian, and the -Fontchevade-Tayacian (p. 59). - -[Illustration: MOUSTERIAN POINT] - - -OTHER SUGGESTIONS OF LIFE IN THE EARLY CAVE LAYERS - -Except for the stone tools, what do we know of the way men lived in the -time range after 100,000 to perhaps 40,000 years ago or even later? -We know that in the area from Europe to Palestine, at least some of -the people (some of the time) lived in the fronts of caves and warmed -themselves over fires. In Europe, in the cave layers of these times, -we find the bones of different animals; the bones in the lowest layers -belong to animals that lived in a warm climate; above them are the -bones of those who could stand the cold, like the reindeer and mammoth. -Thus, the meat diet must have been changing, as the glacier crept -farther south. Shells and possibly fish bones have lasted in these -cave layers, but there is not a trace of the vegetable foods and the -nuts and berries and other wild fruits that must have been eaten when -they could be found. - -[Illustration: CHART SHOWING PRESENT UNDERSTANDING OF RELATIONSHIPS AND -SUCCESSION OF TOOL-PREPARATION TRADITIONS, INDUSTRIES, AND ASSEMBLAGES -OF WEST-CENTRAL EUROPE - -Wavy lines indicate transitions in industrial habits. These transitions -are not yet understood in detail. The glacial and climatic scheme shown -is the alpine one.] - -Bone tools have also been found from this period. Some are called -scrapers, and there are also long chisel-like leg-bone fragments -believed to have been used for skinning animals. Larger hunks of bone, -which seem to have served as anvils or chopping blocks, are fairly -common. - -Bits of mineral, used as coloring matter, have also been found. We -dont know what the color was used for. - -[Illustration: MOUSTERIAN SIDE SCRAPER] - -There is a small but certain number of cases of intentional burials. -These burials have been found on the floors of the caves; in other -words, the people dug graves in the places where they lived. The holes -made for the graves were small. For this reason (or perhaps for some -other?) the bodies were in a curled-up or contracted position. Flint or -bone tools or pieces of meat seem to have been put in with some of the -bodies. In several cases, flat stones had been laid over the graves. - - -TOOLS FROM AFRICA AND ASIA ABOUT 100,000 YEARS AGO - -Professor Movius characterizes early prehistoric Africa as a continent -showing a variety of stone industries. Some of these industries were -purely local developments and some were practically identical with -industries found in Europe at the same time. From northwest Africa -to Capetown--excepting the tropical rain forest region of the west -center--tools of developed Acheulean, Levalloisian, and Mousterian -types have been recognized. Often they are named after African place -names. - -In east and south Africa lived people whose industries show a -development of the Levalloisian technique. Such industries are -called Stillbay. Another industry, developed on the basis of the -Acheulean technique, is called Fauresmith. From the northwest comes -an industry with tanged points and flake-blades; this is called the -Aterian. The tropical rain forest region contained people whose stone -tools apparently show adjustment to this peculiar environment; the -so-called Sangoan industry includes stone picks, adzes, core-bifaces -of specialized Acheulean type, and bifacial points which were probably -spearheads. - -In western Asia, even as far as the east coast of India, the tools of -the Eurafrican core-biface and flake tool traditions continued to be -used. But in the Far East, as we noted in the last chapter, men had -developed characteristic stone chopper and chopping tools. This tool -preparation tradition--basically a pebble tool tradition--lasted to the -very end of the Ice Age. - -When more intact open air sites such as that of an earlier time at -Olorgesailie, and more stratified cave sites are found and excavated -in Asia and Africa, we shall be able to get a more complete picture. -So far, our picture of the general cultural level of the Old World at -about 100,000 years ago--and soon afterwards--is best from Europe, but -it is still far from complete there, too. - - -CULTURE AT THE BEGINNING OF THE LAST GREAT GLACIAL PERIOD - -The few things we have found must indicate only a very small part -of the total activities of the people who lived at the time. All of -the things they made of wood and bark, of skins, of anything soft, -are gone. The fact that burials were made, at least in Europe and -Palestine, is pretty clear proof that the people had some notion of a -life after death. But what this notion really was, or what gods (if -any) men believed in, we cannot know. Dr. Movius has also reminded me -of the so-called bear cults--cases in which caves have been found which -contain the skulls of bears in apparently purposeful arrangement. This -might suggest some notion of hoarding up the spirits or the strength of -bears killed in the hunt. Probably the people lived in small groups, -as hunting and food-gathering seldom provide enough food for large -groups of people. These groups probably had some kind of leader or -chief. Very likely the rude beginnings of rules for community life -and politics, and even law, were being made. But what these were, we -do not know. We can only guess about such things, as we can only guess -about many others; for example, how the idea of a family must have been -growing, and how there may have been witch doctors who made beginnings -in medicine or in art, in the materials they gathered for their trade. - -The stone tools help us most. They have lasted, and we can find -them. As they come to us, from this cave or that, and from this -layer or that, the tool industries show a variety of combinations -of the different basic habits or traditions of tool preparation. -This seems only natural, as the groups of people must have been very -small. The mixtures and blendings of the habits used in making stone -tools must mean that there were also mixtures and blends in many of -the other ideas and beliefs of these small groups. And what this -probably means is that there was no one _culture_ of the time. It is -certainly unlikely that there were simply three cultures, Acheulean, -Levalloisian, and Mousterian, as has been thought in the past. -Rather there must have been a great variety of loosely related cultures -at about the same stage of advancement. We could say, too, that here -we really begin to see, for the first time, that remarkable ability -of men to adapt themselves to a variety of conditions. We shall see -this adaptive ability even more clearly as time goes on and the record -becomes more complete. - -Over how great an area did these loosely related cultures reach in -the time 75,000 to 45,000 or even as late as 35,000 years ago? We -have described stone tools made in one or another of the flake and -core-biface habits, for an enormous area. It covers all of Europe, all -of Africa, the Near East, and parts of India. It is perfectly possible -that the flake and core-biface habits lasted on after 35,000 years ago, -in some places outside of Europe. In northern Africa, for example, we -are certain that they did (see chart, p. 72). - -On the other hand, in the Far East (China, Burma, Java) and in northern -India, the tools of the old chopper-tool tradition were still being -made. Out there, we must assume, there was a different set of loosely -related cultures. At least, there was a different set of loosely -related habits for the making of tools. But the men who made them must -have looked much like the men of the West. Their tools were different, -but just as useful. - -As to what the men of the West looked like, Ive already hinted at all -we know so far (pp. 29 ff.). The Neanderthalers were present at -the time. Some more modern-like men must have been about, too, since -fossils of them have turned up at Mount Carmel in Palestine, and at -Teshik Tash, in Trans-caspian Russia. It is still too soon to know -whether certain combinations of tools within industries were made -only by certain physical types of men. But since tools of both the -core-biface and the flake traditions, and their blends, turn up from -South Africa to England to India, it is most unlikely that only one -type of man used only one particular habit in the preparation of tools. -What seems perfectly clear is that men in Africa and men in India were -making just as good tools as the men who lived in western Europe. - - - - -EARLY MODERNS - -[Illustration] - - -From some time during the first inter-stadial of the last great -glaciation (say some time after about 40,000 years ago), we have -more accurate dates for the European-Mediterranean area and less -accurate ones for the rest of the Old World. This is probably -because the effects of the last glaciation have been studied in the -European-Mediterranean area more than they have been elsewhere. - - -A NEW TRADITION APPEARS - -Something new was probably beginning to happen in the -European-Mediterranean area about 40,000 years ago, though all the -rest of the Old World seems to have been going on as it had been. I -cant be sure of this because the information we are using as a basis -for dates is very inaccurate for the areas outside of Europe and the -Mediterranean. - -We can at least make a guess. In Egypt and north Africa, men were still -using the old methods of making stone tools. This was especially true -of flake tools of the Levalloisian type, save that they were growing -smaller and smaller as time went on. But at the same time, a new -tradition was becoming popular in westernmost Asia and in Europe. This -was the blade-tool tradition. - - -BLADE TOOLS - -A stone blade is really just a long parallel-sided flake, as the -drawing shows. It has sharp cutting edges, and makes a very useful -knife. The real trick is to be able to make one. It is almost -impossible to make a blade out of any stone but flint or a natural -volcanic glass called obsidian. And even if you have flint or obsidian, -you first have to work up a special cone-shaped blade-core, from -which to whack off blades. - -[Illustration: PLAIN BLADE] - -You whack with a hammer stone against a bone or antler punch which is -directed at the proper place on the blade-core. The blade-core has to -be well supported or gripped while this is going on. To get a good -flint blade tool takes a great deal of know-how. - -Remember that a tradition in stone tools means no more than that some -particular way of making the tools got started and lasted a long time. -Men who made some tools in one tradition or set of habits would also -make other tools for different purposes by means of another tradition -or set of habits. It was even possible for the two sets of habits to -become combined. - - -THE EARLIEST BLADE TOOLS - -The oldest blade tools we have found were deep down in the layers of -the Mount Carmel caves, in Tabun Eb and Ea. Similar tools have been -found in equally early cave levels in Syria; their popularity there -seems to fluctuate a bit. Some more or less parallel-sided flakes are -known in the Levalloisian industry in France, but they are probably -no earlier than Tabun E. The Tabun blades are part of a local late -Acheulean industry, which is characterized by core-biface hand -axes, but which has many flake tools as well. Professor F. E. -Zeuner believes that this industry may be more than 120,000 years old; -actually its date has not yet been fixed, but it is very old--older -than the fossil finds of modern-like men in the same caves. - -[Illustration: SUCCESSION OF ICE AGE FLINT TYPES, INDUSTRIES, AND -ASSEMBLAGES, AND OF FOSSIL MEN, IN NORTHWESTERN EURAFRASIA] - -For some reason, the habit of making blades in Palestine and Syria was -interrupted. Blades only reappeared there at about the same time they -were first made in Europe, some time after 45,000 years ago; that is, -after the first phase of the last glaciation was ended. - -[Illustration: BACKED BLADE] - -We are not sure just where the earliest _persisting_ habits for the -production of blade tools developed. Impressed by the very early -momentary appearance of blades at Tabun on Mount Carmel, Professor -Dorothy A. Garrod first favored the Near East as a center of origin. -She spoke of some as yet unidentified Asiatic centre, which she -thought might be in the highlands of Iran or just beyond. But more -recent work has been done in this area, especially by Professor Coon, -and the blade tools do not seem to have an early appearance there. When -the blade tools reappear in the Syro-Palestinian area, they do so in -industries which also include Levalloiso-Mousterian flake tools. From -the point of view of form and workmanship, the blade tools themselves -are not so fine as those which seem to be making their appearance -in western Europe about the same time. There is a characteristic -Syro-Palestinian flake point, possibly a projectile tip, called the -Emiran, which is not known from Europe. The appearance of blade tools, -together with Levalloiso-Mousterian flakes, continues even after the -Emiran point has gone out of use. - -It seems clear that the production of blade tools did not immediately -swamp the set of older habits in Europe, too; the use of flake -tools also continued there. This was not so apparent to the older -archeologists, whose attention was focused on individual tool types. It -is not, in fact, impossible--although it is certainly not proved--that -the technique developed in the preparation of the Levalloisian tortoise -core (and the striking of the Levalloisian flake from it) might have -followed through to the conical core and punch technique for the -production of blades. Professor Garrod is much impressed with the speed -of change during the later phases of the last glaciation, and its -probable consequences. She speaks of the greater number of industries -having enough individual character to be classified as distinct ... -since evolution now starts to outstrip diffusion. Her evolution here -is of course an industrial evolution rather than a biological one. -Certainly the people of Europe had begun to make blade tools during -the warm spell after the first phase of the last glaciation. By about -40,000 years ago blades were well established. The bones of the blade -tool makers weve found so far indicate that anatomically modern men -had now certainly appeared. Unfortunately, only a few fossil men have -so far been found from the very beginning of the blade tool range in -Europe (or elsewhere). What I certainly shall _not_ tell you is that -conquering bands of fine, strong, anatomically modern men, armed with -superior blade tools, came sweeping out of the East to exterminate the -lowly Neanderthalers. Even if we dont know exactly what happened, Id -lay a good bet it wasnt that simple. - -We do know a good deal about different blade industries in Europe. -Almost all of them come from cave layers. There is a great deal of -complication in what we find. The chart (p. 72) tries to simplify -this complication; in fact, it doubtless simplifies it too much. But -it may suggest all the complication of industries which is going -on at this time. You will note that the upper portion of my much -simpler chart (p. 65) covers the same material (in the section -marked Various Blade-Tool Industries). That chart is certainly too -simplified. - -You will realize that all this complication comes not only from -the fact that we are finding more material. It is due also to the -increasing ability of men to adapt themselves to a great variety of -situations. Their tools indicate this adaptiveness. We know there was -a good deal of climatic change at this time. The plants and animals -that men used for food were changing, too. The great variety of tools -and industries we now find reflect these changes and the ability of men -to keep up with the times. Now, for example, is the first time we are -sure that there are tools to _make_ other tools. They also show mens -increasing ability to adapt themselves. - - -SPECIAL TYPES OF BLADE TOOLS - -The most useful tools that appear at this time were made from blades. - - 1. The backed blade. This is a knife made of a flint blade, with - one edge purposely blunted, probably to save the users fingers - from being cut. There are several shapes of backed blades (p. - 73). - - [Illustration: TWO BURINS] - - 2. The _burin_ or graver. The burin was the original chisel. Its - cutting edge is _transverse_, like a chisels. Some burins are - made like a screw-driver, save that burins are sharp. Others have - edges more like the blade of a chisel or a push plane, with - only one bevel. Burins were probably used to make slots in wood - and bone; that is, to make handles or shafts for other tools. - They must also be the tools with which much of the engraving on - bone (see p. 83) was done. There is a bewildering variety of - different kinds of burins. - -[Illustration: TANGED POINT] - - 3. The tanged point. These stone points were used to tip arrows or - light spears. They were made from blades, and they had a long tang - at the bottom where they were fixed to the shaft. At the place - where the tang met the main body of the stone point, there was - a marked shoulder, the beginnings of a barb. Such points had - either one or two shoulders. - -[Illustration: NOTCHED BLADE] - - 4. The notched or strangulated blade. Along with the points for - arrows or light spears must go a tool to prepare the arrow or - spear shaft. Today, such a tool would be called a draw-knife or - a spoke-shave, and this is what the notched blades probably are. - Our spoke-shaves have sharp straight cutting blades and really - shave. Notched blades of flint probably scraped rather than cut. - - 5. The awl, drill, or borer. These blade tools are worked out - to a spike-like point. They must have been used for making holes - in wood, bone, shell, skin, or other things. - -[Illustration: DRILL OR AWL] - - 6. The end-scraper on a blade is a tool with one or both ends - worked so as to give a good scraping edge. It could have been used - to hollow out wood or bone, scrape hides, remove bark from trees, - and a number of other things (p. 78). - -There is one very special type of flint tool, which is best known from -western Europe in an industry called the Solutrean. These tools were -usually made of blades, but the best examples are so carefully worked -on both sides (bifacially) that it is impossible to see the original -blade. This tool is - - 7. The laurel leaf point. Some of these tools were long and - dagger-like, and must have been used as knives or daggers. Others - were small, called willow leaf, and must have been mounted on - spear or arrow shafts. Another typical Solutrean tool is the - shouldered point. Both the laurel leaf and shouldered point - types are illustrated (see above and p. 79). - -[Illustration: END-SCRAPER ON A BLADE] - -[Illustration: LAUREL LEAF POINT] - -The industries characterized by tools in the blade tradition also -yield some flake and core tools. We will end this list with two types -of tools that appear at this time. The first is made of a flake; the -second is a core tool. - -[Illustration: SHOULDERED POINT] - - 8. The keel-shaped round scraper is usually small and quite round, - and has had chips removed up to a peak in the center. It is called - keel-shaped because it is supposed to look (when upside down) - like a section through a boat. Actually, it looks more like a tent - or an umbrella. Its outer edges are sharp all the way around, and - it was probably a general purpose scraping tool (see illustration, - p. 81). - - 9. The keel-shaped nosed scraper is a much larger and heavier tool - than the round scraper. It was made on a core with a flat bottom, - and has one nicely worked end or nose. Such tools are usually - large enough to be easily grasped, and probably were used like - push planes (see illustration, p. 81). - -[Illustration: KEEL-SHAPED ROUND SCRAPER] - -[Illustration: KEEL-SHAPED NOSED SCRAPER] - -The stone tools (usually made of flint) we have just listed are among -the most easily recognized blade tools, although they show differences -in detail at different times. There are also many other kinds. Not -all of these tools appear in any one industry at one time. Thus the -different industries shown in the chart (p. 72) each have only some -of the blade tools weve just listed, and also a few flake tools. Some -industries even have a few core tools. The particular types of blade -tools appearing in one cave layer or another, and the frequency of -appearance of the different types, tell which industry we have in each -layer. - - -OTHER KINDS OF TOOLS - -By this time in Europe--say from about 40,000 to about 10,000 years -ago--we begin to find other kinds of material too. Bone tools begin -to appear. There are knives, pins, needles with eyes, and little -double-pointed straight bars of bone that were probably fish-hooks. The -fish-line would have been fastened in the center of the bar; when the -fish swallowed the bait, the bar would have caught cross-wise in the -fishs mouth. - -One quite special kind of bone tool is a long flat point for a light -spear. It has a deep notch cut up into the breadth of its base, and is -called a split-based bone point (p. 82). We know examples of bone -beads from these times, and of bone handles for flint tools. Pierced -teeth of some animals were worn as beads or pendants, but I am not sure -that elks teeth were worn this early. There are even spool-shaped -buttons or toggles. - -[Illustration: SPLIT-BASED BONE POINT] - -[Illustration: SPEAR-THROWER] - -[Illustration: BONE HARPOON] - -Antler came into use for tools, especially in central and western -Europe. We do not know the use of one particular antler tool that -has a large hole bored in one end. One suggestion is that it was -a thong-stropper used to strop or work up hide thongs (see -illustration, below); another suggestion is that it was an arrow-shaft -straightener. - -Another interesting tool, usually of antler, is the spear-thrower, -which is little more than a stick with a notch or hook on one end. -The hook fits into the butt end of the spear, and the length of the -spear-thrower allows you to put much more power into the throw (p. -82). It works on pretty much the same principle as the sling. - -Very fancy harpoons of antler were also made in the latter half of -the period in western Europe. These harpoons had barbs on one or both -sides and a base which would slip out of the shaft (p. 82). Some have -engraved decoration. - - -THE BEGINNING OF ART - -[Illustration: THONG-STROPPER] - -In western Europe, at least, the period saw the beginning of several -kinds of art work. It is handy to break the art down into two great -groups: the movable art, and the cave paintings and sculpture. The -movable art group includes the scratchings, engravings, and modeling -which decorate tools and weapons. Knives, stroppers, spear-throwers, -harpoons, and sometimes just plain fragments of bone or antler are -often carved. There is also a group of large flat pebbles which seem -almost to have served as sketch blocks. The surfaces of these various -objects may show animals, or rather abstract floral designs, or -geometric designs. - -[Illustration: VENUS FIGURINE FROM WILLENDORF] - -Some of the movable art is not done on tools. The most remarkable -examples of this class are little figures of women. These women seem to -be pregnant, and their most female characteristics are much emphasized. -It is thought that these Venus or Mother-goddess figurines may be -meant to show the great forces of nature--fertility and the birth of -life. - - -CAVE PAINTINGS - -In the paintings on walls and ceilings of caves we have some examples -that compare with the best art of any time. The subjects were usually -animals, the great cold-weather beasts of the end of the Ice Age: the -mammoth, the wooly rhinoceros, the bison, the reindeer, the wild horse, -the bear, the wild boar, and wild cattle. As in the movable art, there -are different styles in the cave art. The really great cave art is -pretty well restricted to southern France and Cantabrian (northwestern) -Spain. - -There are several interesting things about the Franco-Cantabrian cave -art. It was done deep down in the darkest and most dangerous parts of -the caves, although the men lived only in the openings of caves. If you -think what they must have had for lights--crude lamps of hollowed stone -have been found, which must have burned some kind of oil or grease, -with a matted hair or fiber wick--and of the animals that may have -lurked in the caves, youll understand the part about danger. Then, -too, were sure the pictures these people painted were not simply to be -looked at and admired, for they painted one picture right over other -pictures which had been done earlier. Clearly, it was the _act_ of -_painting_ that counted. The painter had to go way down into the most -mysterious depths of the earth and create an animal in paint. Possibly -he believed that by doing this he gained some sort of magic power over -the same kind of animal when he hunted it in the open air. It certainly -doesnt look as if he cared very much about the picture he painted--as -a finished product to be admired--for he or somebody else soon went -down and painted another animal right over the one he had done. - -The cave art of the Franco-Cantabrian style is one of the great -artistic achievements of all time. The subjects drawn are almost always -the larger animals of the time: the bison, wild cattle and horses, the -wooly rhinoceros, the mammoth, the wild boar, and the bear. In some of -the best examples, the beasts are drawn in full color and the paintings -are remarkably alive and charged with energy. They come from the hands -of men who knew the great animals well--knew the feel of their fur, the -tremendous drive of their muscles, and the danger one faced when he -hunted them. - -Another artistic style has been found in eastern Spain. It includes -lively drawings, often of people hunting with bow and arrow. The East -Spanish art is found on open rock faces and in rock-shelters. It is -less spectacular and apparently more recent than the Franco-Cantabrian -cave art. - - -LIFE AT THE END OF THE ICE AGE IN EUROPE - -Life in these times was probably as good as a hunter could expect it -to be. Game and fish seem to have been plentiful; berries and wild -fruits probably were, too. From France to Russia, great pits or -piles of animal bones have been found. Some of this killing was done -as our Plains Indians killed the buffalo--by stampeding them over -steep river banks or cliffs. There were also good tools for hunting, -however. In western Europe, people lived in the openings of caves and -under overhanging rocks. On the great plains of eastern Europe, very -crude huts were being built, half underground. The first part of this -time must have been cold, for it was the middle and end phases of the -last great glaciation. Northern Europe from Scotland to Scandinavia, -northern Germany and Russia, and also the higher mountains to the -south, were certainly covered with ice. But people had fire, and the -needles and tools that were used for scraping hides must mean that they -wore clothing. - -It is clear that men were thinking of a great variety of things beside -the tools that helped them get food and shelter. Such burials as we -find have more grave-gifts than before. Beads and ornaments and often -flint, bone, or antler tools are included in the grave, and sometimes -the body is sprinkled with red ochre. Red is the color of blood, which -means life, and of fire, which means heat. Professor Childe wonders if -the red ochre was a pathetic attempt at magic--to give back to the body -the heat that had gone from it. But pathetic or not, it is sure proof -that these people were already moved by death as men still are moved by -it. - -Their art is another example of the direction the human mind was -taking. And when I say human, I mean it in the fullest sense, for this -is the time in which fully modern man has appeared. On page 34, we -spoke of the Cro-Magnon group and of the Combe Capelle-Brnn group of -Caucasoids and of the Grimaldi Negroids, who are no longer believed -to be Negroid. I doubt that any one of these groups produced most of -the achievements of the times. Its not yet absolutely sure which -particular group produced the great cave art. The artists were almost -certainly a blend of several (no doubt already mixed) groups. The pair -of Grimaldians were buried in a grave with a sprinkling of red ochre, -and were provided with shell beads and ornaments and with some blade -tools of flint. Regardless of the different names once given them by -the human paleontologists, each of these groups seems to have shared -equally in the cultural achievements of the times, for all that the -archeologists can say. - - -MICROLITHS - -One peculiar set of tools seems to serve as a marker for the very last -phase of the Ice Age in southwestern Europe. This tool-making habit is -also found about the shore of the Mediterranean basin, and it moved -into northern Europe as the last glaciation pulled northward. People -began making blade tools of very small size. They learned how to chip -very slender and tiny blades from a prepared core. Then they made these -little blades into tiny triangles, half-moons (lunates), trapezoids, -and several other geometric forms. These little tools are called -microliths. They are so small that most of them must have been fixed -in handles or shafts. - -[Illustration: MICROLITHS - - BLADE FRAGMENT - BURIN - LUNATE - TRAPEZOID - SCALENE TRIANGLE - ARROWHEAD] - -We have found several examples of microliths mounted in shafts. In -northern Europe, where their use soon spread, the microlithic triangles -or lunates were set in rows down each side of a bone or wood point. -One corner of each little triangle stuck out, and the whole thing -made a fine barbed harpoon. In historic times in Egypt, geometric -trapezoidal microliths were still in use as arrowheads. They were -fastened--broad end out--on the end of an arrow shaft. It seems queer -to give an arrow a point shaped like a T. Actually, the little points -were very sharp, and must have pierced the hides of animals very -easily. We also think that the broader cutting edge of the point may -have caused more bleeding than a pointed arrowhead would. In hunting -fleet-footed animals like the gazelle, which might run for miles after -being shot with an arrow, it was an advantage to cause as much bleeding -as possible, for the animal would drop sooner. - -We are not really sure where the microliths were first invented. There -is some evidence that they appear early in the Near East. Their use -was very common in northwest Africa but this came later. The microlith -makers who reached south Russia and central Europe possibly moved up -out of the Near East. Or it may have been the other way around; we -simply dont yet know. - -Remember that the microliths we are talking about here were made from -carefully prepared little blades, and are often geometric in outline. -Each microlithic industry proper was made up, in good part, of such -tiny blade tools. But there were also some normal-sized blade tools and -even some flake scrapers, in most microlithic industries. I emphasize -this bladelet and the geometric character of the microlithic industries -of the western Old World, since there has sometimes been confusion in -the matter. Sometimes small flake chips, utilized as minute pointed -tools, have been called microliths. They may be _microlithic_ in size -in terms of the general meaning of the word, but they do not seem to -belong to the sub-tradition of the blade tool preparation habits which -we have been discussing here. - - -LATER BLADE-TOOL INDUSTRIES OF THE NEAR EAST AND AFRICA - -The blade-tool industries of normal size we talked about earlier spread -from Europe to central Siberia. We noted that blade tools were made -in western Asia too, and early, although Professor Garrod is no longer -sure that the whole tradition originated in the Near East. If you look -again at my chart (p. 72) you will note that in western Asia I list -some of the names of the western European industries, but with the -qualification -like (for example, Gravettian-like). The western -Asiatic blade-tool industries do vaguely recall some aspects of those -of western Europe, but we would probably be better off if we used -completely local names for them. The Emiran of my chart is such an -example; its industry includes a long spike-like blade point which has -no western European counterpart. - -When we last spoke of Africa (p. 66), I told you that stone tools -there were continuing in the Levalloisian flake tradition, and were -becoming smaller. At some time during this process, two new tool -types appeared in northern Africa: one was the Aterian point with -a tang (p. 67), and the other was a sort of laurel leaf point, -called the Sbaikian. These two tool types were both produced from -flakes. The Sbaikian points, especially, are roughly similar to some -of the Solutrean points of Europe. It has been suggested that both the -Sbaikian and Aterian points may be seen on their way to France through -their appearance in the Spanish cave deposits of Parpallo, but there is -also a rival pre-Solutrean in central Europe. We still do not know -whether there was any contact between the makers of these north African -tools and the Solutrean tool-makers. What does seem clear is that the -blade-tool tradition itself arrived late in northern Africa. - - -NETHER AFRICA - -Blade tools and laurel leaf points and some other probably late -stone tool types also appear in central and southern Africa. There -are geometric microliths on bladelets and even some coarse pottery in -east Africa. There is as yet no good way of telling just where these -items belong in time; in broad geological terms they are late. -Some people have guessed that they are as early as similar European -and Near Eastern examples, but I doubt it. The makers of small-sized -Levalloisian flake tools occupied much of Africa until very late in -time. - - -THE FAR EAST - -India and the Far East still seem to be going their own way. In India, -some blade tools have been found. These are not well dated, save that -we believe they must be post-Pleistocene. In the Far East it looks as -if the old chopper-tool tradition was still continuing. For Burma, -Dr. Movius feels this is fairly certain; for China he feels even more -certain. Actually, we know very little about the Far East at about the -time of the last glaciation. This is a shame, too, as you will soon -agree. - - -THE NEW WORLD BECOMES INHABITED - -At some time toward the end of the last great glaciation--almost -certainly after 20,000 years ago--people began to move over Bering -Strait, from Asia into America. As you know, the American Indians have -been assumed to be basically Mongoloids. New studies of blood group -types make this somewhat uncertain, but there is no doubt that the -ancestors of the American Indians came from Asia. - -The stone-tool traditions of Europe, Africa, the Near and Middle East, -and central Siberia, did _not_ move into the New World. With only a -very few special or late exceptions, there are _no_ core-bifaces, -flakes, or blade tools of the Old World. Such things just havent been -found here. - -This is why I say its a shame we dont know more of the end of the -chopper-tool tradition in the Far East. According to Weidenreich, -the Mongoloids were in the Far East long before the end of the last -glaciation. If the genetics of the blood group types do demand a -non-Mongoloid ancestry for the American Indians, who else may have been -in the Far East 25,000 years ago? We know a little about the habits -for making stone tools which these first people brought with them, -and these habits dont conform with those of the western Old World. -Wed better keep our eyes open for whatever happened to the end of -the chopper-tool tradition in northern China; already there are hints -that it lasted late there. Also we should watch future excavations -in eastern Siberia. Perhaps we shall find the chopper-tool tradition -spreading up that far. - - -THE NEW ERA - -Perhaps it comes in part from the way I read the evidence and perhaps -in part it is only intuition, but I feel that the materials of this -chapter suggest a new era in the ways of life. Before about 40,000 -years ago, people simply gathered their food, wandering over large -areas to scavenge or to hunt in a simple sort of way. But here we -have seen them settling-in more, perhaps restricting themselves in -their wanderings and adapting themselves to a given locality in more -intensive ways. This intensification might be suggested by the word -collecting. The ways of life we described in the earlier chapters -were food-gathering ways, but now an era of food-collecting has -begun. We shall see further intensifications of it in the next chapter. - - - - -End and PRELUDE - -[Illustration] - - -Up to the end of the last glaciation, we prehistorians have a -relatively comfortable time schedule. The farther back we go the less -exact we can be about time and details. Elbow-room of five, ten, -even fifty or more thousands of years becomes available for us to -maneuver in as we work backward in time. But now our story has come -forward to the point where more exact methods of dating are at hand. -The radioactive carbon method reaches back into the span of the last -glaciation. There are other methods, developed by the geologists and -paleobotanists, which supplement and extend the usefulness of the -radioactive carbon dates. And, happily, as our means of being more -exact increases, our story grows more exciting. There are also more -details of culture for us to deal with, which add to the interest. - - -CHANGES AT THE END OF THE ICE AGE - -The last great glaciation of the Ice Age was a two-part affair, with a -sub-phase at the end of the second part. In Europe the last sub-phase -of this glaciation commenced somewhere around 15,000 years ago. Then -the glaciers began to melt back, for the last time. Remember that -Professor Antevs (p. 19) isnt sure the Ice Age is over yet! This -melting sometimes went by fits and starts, and the weather wasnt -always changing for the better; but there was at least one time when -European weather was even better than it is now. - -The melting back of the glaciers and the weather fluctuations caused -other changes, too. We know a fair amount about these changes in -Europe. In an earlier chapter, we said that the whole Ice Age was a -matter of continual change over long periods of time. As the last -glaciers began to melt back some interesting things happened to mankind. - -In Europe, along with the melting of the last glaciers, geography -itself was changing. Britain and Ireland had certainly become islands -by 5000 B.C. The Baltic was sometimes a salt sea, sometimes a large -fresh-water lake. Forests began to grow where the glaciers had been, -and in what had once been the cold tundra areas in front of the -glaciers. The great cold-weather animals--the mammoth and the wooly -rhinoceros--retreated northward and finally died out. It is probable -that the efficient hunting of the earlier people of 20,000 or 25,000 -to about 12,000 years ago had helped this process along (see p. 86). -Europeans, especially those of the post-glacial period, had to keep -changing to keep up with the times. - -The archeological materials for the time from 10,000 to 6000 B.C. seem -simpler than those of the previous five thousand years. The great cave -art of France and Spain had gone; so had the fine carving in bone and -antler. Smaller, speedier animals were moving into the new forests. New -ways of hunting them, or ways of getting other food, had to be found. -Hence, new tools and weapons were necessary. Some of the people who -moved into northern Germany were successful reindeer hunters. Then the -reindeer moved off to the north, and again new sources of food had to -be found. - - -THE READJUSTMENTS COMPLETED IN EUROPE - -After a few thousand years, things began to look better. Or at least -we can say this: By about 6000 B.C. we again get hotter archeological -materials. The best of these come from the north European area: -Britain, Belgium, Holland, Denmark, north Germany, southern Norway and -Sweden. Much of this north European material comes from bogs and swamps -where it had become water-logged and has kept very well. Thus we have -much more complete _assemblages_[4] than for any time earlier. - - [4] Assemblage is a useful word when there are different kinds of - archeological materials belonging together, from one area and of - one time. An assemblage is made up of a number of industries - (that is, all the tools in chipped stone, all the tools in - bone, all the tools in wood, the traces of houses, etc.) and - everything else that manages to survive, such as the art, the - burials, the bones of the animals used as food, and the traces - of plant foods; in fact, everything that has been left to us - and can be used to help reconstruct the lives of the people to - whom it once belonged. Our own present-day assemblage would be - the sum total of all the objects in our mail-order catalogues, - department stores and supply houses of every sort, our churches, - our art galleries and other buildings, together with our roads, - canals, dams, irrigation ditches, and any other traces we might - leave of ourselves, from graves to garbage dumps. Not everything - would last, so that an archeologist digging us up--say 2,000 - years from now--would find only the most durable items in our - assemblage. - -The best known of these assemblages is the _Maglemosian_, named after a -great Danish peat-swamp where much has been found. - -[Illustration: SKETCH OF MAGLEMOSIAN ASSEMBLAGE - - CHIPPED STONE - HEMP - GROUND STONE - BONE AND ANTLER - WOOD] - -In the Maglemosian assemblage the flint industry was still very -important. Blade tools, tanged arrow points, and burins were still -made, but there were also axes for cutting the trees in the new -forests. Moreover, the tiny microlithic blades, in a variety of -geometric forms, are also found. Thus, a specialized tradition that -possibly began east of the Mediterranean had reached northern Europe. -There was also a ground stone industry; some axes and club-heads were -made by grinding and polishing rather than by chipping. The industries -in bone and antler show a great variety of tools: axes, fish-hooks, -fish spears, handles and hafts for other tools, harpoons, and clubs. -A remarkable industry in wood has been preserved. Paddles, sled -runners, handles for tools, and bark floats for fish-nets have been -found. There are even fish-nets made of plant fibers. Canoes of some -kind were no doubt made. Bone and antler tools were decorated with -simple patterns, and amber was collected. Wooden bows and arrows are -found. - -It seems likely that the Maglemosian bog finds are remains of summer -camps, and that in winter the people moved to higher and drier regions. -Childe calls them the Forest folk; they probably lived much the -same sort of life as did our pre-agricultural Indians of the north -central states. They hunted small game or deer; they did a great deal -of fishing; they collected what plant food they could find. In fact, -their assemblage shows us again that remarkable ability of men to adapt -themselves to change. They had succeeded in domesticating the dog; he -was still a very wolf-like dog, but his long association with mankind -had now begun. Professor Coon believes that these people were direct -descendants of the men of the glacial age and that they had much the -same appearance. He believes that most of the Ice Age survivors still -extant are living today in the northwestern European area. - - -SOUTH AND CENTRAL EUROPE PERHAPS AS READJUSTED AS THE NORTH - -There is always one trouble with things that come from areas where -preservation is exceptionally good: The very quantity of materials in -such an assemblage tends to make things from other areas look poor -and simple, although they may not have been so originally at all. The -assemblages of the people who lived to the south of the Maglemosian -area may also have been quite large and varied; but, unfortunately, -relatively little of the southern assemblages has lasted. The -water-logged sites of the Maglemosian area preserved a great deal -more. Hence the Maglemosian itself _looks_ quite advanced to us, when -we compare it with the few things that have happened to last in other -areas. If we could go back and wander over the Europe of eight thousand -years ago, we would probably find that the peoples of France, central -Europe, and south central Russia were just as advanced as those of the -north European-Baltic belt. - -South of the north European belt the hunting-food-collecting peoples -were living on as best they could during this time. One interesting -group, which seems to have kept to the regions of sandy soil and scrub -forest, made great quantities of geometric microliths. These are the -materials called _Tardenoisian_. The materials of the Forest folk of -France and central Europe generally are called _Azilian_; Dr. Movius -believes the term might best be restricted to the area south of the -Loire River. - - -HOW MUCH REAL CHANGE WAS THERE? - -You can see that no really _basic_ change in the way of life has yet -been described. Childe sees the problem that faced the Europeans of -10,000 to 3000 B.C. as a problem in readaptation to the post-glacial -forest environment. By 6000 B.C. some quite successful solutions of -the problem--like the Maglemosian--had been made. The upsets that came -with the melting of the last ice gradually brought about all sorts of -changes in the tools and food-getting habits, but the people themselves -were still just as much simple hunters, fishers, and food-collectors as -they had been in 25,000 B.C. It could be said that they changed just -enough so that they would not have to change. But there is a bit more -to it than this. - -Professor Mathiassen of Copenhagen, who knows the archeological remains -of this time very well, poses a question. He speaks of the material -as being neither rich nor progressive, in fact rather stagnant, but -he goes on to add that the people had a certain receptiveness and -were able to adapt themselves quickly when the next change did come. -My own understanding of the situation is that the Forest folk made -nothing as spectacular as had the producers of the earlier Magdalenian -assemblage and the Franco-Cantabrian art. On the other hand, they -_seem_ to have been making many more different kinds of tools for many -more different kinds of tasks than had their Ice Age forerunners. I -emphasize seem because the preservation in the Maglemosian bogs -is very complete; certainly we cannot list anywhere near as many -different things for earlier times as we did for the Maglemosians -(p. 94). I believe this experimentation with all kinds of new tools -and gadgets, this intensification of adaptiveness (p. 91), this -receptiveness, even if it is still only pointed toward hunting, -fishing, and food-collecting, is an important thing. - -Remember that the only marker we have handy for the _beginning_ of -this tendency toward receptiveness and experimentation is the -little microlithic blade tools of various geometric forms. These, we -saw, began before the last ice had melted away, and they lasted on -in use for a very long time. I wish there were a better marker than -the microliths but I do not know of one. Remember, too, that as yet -we can only use the microliths as a marker in Europe and about the -Mediterranean. - - -CHANGES IN OTHER AREAS? - -All this last section was about Europe. How about the rest of the world -when the last glaciers were melting away? - -We simply dont know much about this particular time in other parts -of the world except in Europe, the Mediterranean basin and the Middle -East. People were certainly continuing to move into the New World by -way of Siberia and the Bering Strait about this time. But for the -greater part of Africa and Asia, we do not know exactly what was -happening. Some day, we shall no doubt find out; today we are without -clear information. - - -REAL CHANGE AND PRELUDE IN THE NEAR EAST - -The appearance of the microliths and the developments made by the -Forest folk of northwestern Europe also mark an end. They show us -the terminal phase of the old food-collecting way of life. It grows -increasingly clear that at about the same time that the Maglemosian and -other Forest folk were adapting themselves to hunting, fishing, and -collecting in new ways to fit the post-glacial environment, something -completely new was being made ready in western Asia. - -Unfortunately, we do not have as much understanding of the climate and -environment of the late Ice Age in western Asia as we have for most -of Europe. Probably the weather was never so violent or life quite -so rugged as it was in northern Europe. We know that the microliths -made their appearance in western Asia at least by 10,000 B.C. and -possibly earlier, marking the beginning of the terminal phase of -food-collecting. Then, gradually, we begin to see the build-up towards -the first _basic change_ in human life. - -This change amounted to a revolution just as important as the -Industrial Revolution. In it, men first learned to domesticate -plants and animals. They began _producing_ their food instead of -simply gathering or collecting it. When their food-production -became reasonably effective, people could and did settle down in -village-farming communities. With the appearance of the little farming -villages, a new way of life was actually under way. Professor Childe -has good reason to speak of the food-producing revolution, for it was -indeed a revolution. - - -QUESTIONS ABOUT CAUSE - -We do not yet know _how_ and _why_ this great revolution took place. We -are only just beginning to put the questions properly. I suspect the -answers will concern some delicate and subtle interplay between man and -nature. Clearly, both the level of culture and the natural condition of -the environment must have been ready for the great change, before the -change itself could come about. - -It is going to take years of co-operative field work by both -archeologists and the natural scientists who are most helpful to them -before the _how_ and _why_ answers begin to appear. Anthropologically -trained archeologists are fascinated with the cultures of men in times -of great change. About ten or twelve thousand years ago, the general -level of culture in many parts of the world seems to have been ready -for change. In northwestern Europe, we saw that cultures changed -just enough so that they would not have to change. We linked this to -environmental changes with the coming of post-glacial times. - -In western Asia, we archeologists can prove that the food-producing -revolution actually took place. We can see _the_ important consequence -of effective domestication of plants and animals in the appearance of -the settled village-farming community. And within the village-farming -community was the seed of civilization. The way in which effective -domestication of plants and animals came about, however, must also be -linked closely with the natural environment. Thus the archeologists -will not solve the _how_ and _why_ questions alone--they will need the -help of interested natural scientists in the field itself. - - -PRECONDITIONS FOR THE REVOLUTION - -Especially at this point in our story, we must remember how culture and -environment go hand in hand. Neither plants nor animals domesticate -themselves; men domesticate them. Furthermore, men usually domesticate -only those plants and animals which are useful. There is a good -question here: What is cultural usefulness? But I shall side-step it to -save time. Men cannot domesticate plants and animals that do not exist -in the environment where the men live. Also, there are certainly some -animals and probably some plants that resist domestication, although -they might be useful. - -This brings me back again to the point that _both_ the level of culture -and the natural condition of the environment--with the proper plants -and animals in it--must have been ready before domestication could -have happened. But this is precondition, not cause. Why did effective -food-production happen first in the Near East? Why did it happen -independently in the New World slightly later? Why also in the Far -East? Why did it happen at all? Why are all human beings not still -living as the Maglemosians did? These are the questions we still have -to face. - - -CULTURAL RECEPTIVENESS AND PROMISING ENVIRONMENTS - -Until the archeologists and the natural scientists--botanists, -geologists, zoologists, and general ecologists--have spent many more -years on the problem, we shall not have full _how_ and _why_ answers. I -do think, however, that we are beginning to understand what to look for. - -We shall have to learn much more of what makes the cultures of men -receptive and experimental. Did change in the environment alone -force it? Was it simply a case of Professor Toynbees challenge and -response? I cannot believe the answer is quite that simple. Were it -so simple, we should want to know why the change hadnt come earlier, -along with earlier environmental changes. We shall not know the answer, -however, until we have excavated the traces of many more cultures of -the time in question. We shall doubtless also have to learn more about, -and think imaginatively about, the simpler cultures still left today. -The mechanics of culture in general will be bound to interest us. - -It will also be necessary to learn much more of the environments of -10,000 to 12,000 years ago. In which regions of the world were the -natural conditions most promising? Did this promise include plants and -animals which could be domesticated, or did it only offer new ways of -food-collecting? There is much work to do on this problem, but we are -beginning to get some general hints. - -Before I begin to detail the hints we now have from western Asia, I -want to do two things. First, I shall tell you of an old theory as to -how food-production might have appeared. Second, I will bother you with -some definitions which should help us in our thinking as the story goes -on. - - -AN OLD THEORY AS TO THE CAUSE OF THE REVOLUTION - -The idea that change would result, if the balance between nature -and culture became upset, is of course not a new one. For at least -twenty-five years, there has been a general theory as to _how_ the -food-producing revolution happened. This theory depends directly on the -idea of natural change in the environment. - -The five thousand years following about 10,000 B.C. must have been -very difficult ones, the theory begins. These were the years when -the most marked melting of the last glaciers was going on. While the -glaciers were in place, the climate to the south of them must have been -different from the climate in those areas today. You have no doubt read -that people once lived in regions now covered by the Sahara Desert. -This is true; just when is not entirely clear. The theory is that -during the time of the glaciers, there was a broad belt of rain winds -south of the glaciers. These rain winds would have kept north Africa, -the Nile Valley, and the Middle East green and fertile. But when the -glaciers melted back to the north, the belt of rain winds is supposed -to have moved north too. Then the people living south and east of the -Mediterranean would have found that their water supply was drying up, -that the animals they hunted were dying or moving away, and that the -plant foods they collected were dried up and scarce. - -According to the theory, all this would have been true except in the -valleys of rivers and in oases in the growing deserts. Here, in the -only places where water was left, the men and animals and plants would -have clustered. They would have been forced to live close to one -another, in order to live at all. Presently the men would have seen -that some animals were more useful or made better food than others, -and so they would have begun to protect these animals from their -natural enemies. The men would also have been forced to try new plant -foods--foods which possibly had to be prepared before they could be -eaten. Thus, with trials and errors, but by being forced to live close -to plants and animals, men would have learned to domesticate them. - - -THE OLD THEORY TOO SIMPLE FOR THE FACTS - -This theory was set up before we really knew anything in detail about -the later prehistory of the Near and Middle East. We now know that -the facts which have been found dont fit the old theory at all well. -Also, I have yet to find an American meteorologist who feels that we -know enough about the changes in the weather pattern to say that it can -have been so simple and direct. And, of course, the glacial ice which -began melting after 12,000 years ago was merely the last sub-phase of -the last great glaciation. There had also been three earlier periods -of great alpine glaciers, and long periods of warm weather in between. -If the rain belt moved north as the glaciers melted for the last time, -it must have moved in the same direction in earlier times. Thus, the -forced neighborliness of men, plants, and animals in river valleys and -oases must also have happened earlier. Why didnt domestication happen -earlier, then? - -Furthermore, it does not seem to be in the oases and river valleys -that we have our first or only traces of either food-production -or the earliest farming villages. These traces are also in the -hill-flanks of the mountains of western Asia. Our earliest sites of the -village-farmers do not seem to indicate a greatly different climate -from that which the same region now shows. In fact, everything we now -know suggests that the old theory was just too simple an explanation to -have been the true one. The only reason I mention it--beyond correcting -the ideas you may get in the general texts--is that it illustrates the -kind of thinking we shall have to do, even if it is doubtless wrong in -detail. - -We archeologists shall have to depend much more than we ever have on -the natural scientists who can really help us. I can tell you this from -experience. I had the great good fortune to have on my expedition staff -in Iraq in 1954-55, a geologist, a botanist, and a zoologist. Their -studies added whole new bands of color to my spectrum of thinking about -_how_ and _why_ the revolution took place and how the village-farming -community began. But it was only a beginning; as I said earlier, we are -just now learning to ask the proper questions. - - -ABOUT STAGES AND ERAS - -Now come some definitions, so I may describe my material more easily. -Archeologists have always loved to make divisions and subdivisions -within the long range of materials which they have found. They often -disagree violently about which particular assemblage of material -goes into which subdivision, about what the subdivisions should be -named, about what the subdivisions really mean culturally. Some -archeologists, probably through habit, favor an old scheme of Grecized -names for the subdivisions: paleolithic, mesolithic, neolithic. I -refuse to use these words myself. They have meant too many different -things to too many different people and have tended to hide some pretty -fuzzy thinking. Probably you havent even noticed my own scheme of -subdivision up to now, but Id better tell you in general what it is. - -I think of the earliest great group of archeological materials, from -which we can deduce only a food-gathering way of culture, as the -_food-gathering stage_. I say stage rather than age, because it -is not quite over yet; there are still a few primitive people in -out-of-the-way parts of the world who remain in the _food-gathering -stage_. In fact, Professor Julian Steward would probably prefer to call -it a food-gathering _level_ of existence, rather than a stage. This -would be perfectly acceptable to me. I also tend to find myself using -_collecting_, rather than _gathering_, for the more recent aspects or -era of the stage, as the word collecting appears to have more sense -of purposefulness and specialization than does gathering (see p. -91). - -Now, while I think we could make several possible subdivisions of the -food-gathering stage--I call my subdivisions of stages _eras_[5]--I -believe the only one which means much to us here is the last or -_terminal sub-era of food-collecting_ of the whole food-gathering -stage. The microliths seem to mark its approach in the northwestern -part of the Old World. It is really shown best in the Old World by -the materials of the Forest folk, the cultural adaptation to the -post-glacial environment in northwestern Europe. We talked about -the Forest folk at the beginning of this chapter, and I used the -Maglemosian assemblage of Denmark as an example. - - [5] It is difficult to find words which have a sequence or gradation - of meaning with respect to both development and a range of time - in the past, or with a range of time from somewhere in the past - which is perhaps not yet ended. One standard Webster definition - of _stage_ is: One of the steps into which the material - development of man ... is divided. I cannot find any dictionary - definition that suggests which of the words, _stage_ or _era_, - has the meaning of a longer span of time. Therefore, I have - chosen to let my eras be shorter, and to subdivide my stages - into eras. Webster gives _era_ as: A signal stage of history, - an epoch. When I want to subdivide my eras, I find myself using - _sub-eras_. Thus I speak of the _eras_ within a _stage_ and of - the _sub-eras_ within an _era_; that is, I do so when I feel - that I really have to, and when the evidence is clear enough to - allow it. - -The food-producing revolution ushers in the _food-producing stage_. -This stage began to be replaced by the _industrial stage_ only about -two hundred years ago. Now notice that my stage divisions are in terms -of technology and economics. We must think sharply to be sure that the -subdivisions of the stages, the eras, are in the same terms. This does -not mean that I think technology and economics are the only important -realms of culture. It is rather that for most of prehistoric time the -materials left to the archeologists tend to limit our deductions to -technology and economics. - -Im so soon out of my competence, as conventional ancient history -begins, that I shall only suggest the earlier eras of the -food-producing stage to you. This book is about prehistory, and Im not -a universal historian. - - -THE TWO EARLIEST ERAS OF THE FOOD-PRODUCING STAGE - -The food-producing stage seems to appear in western Asia with really -revolutionary suddenness. It is seen by the relative speed with which -the traces of new crafts appear in the earliest village-farming -community sites weve dug. It is seen by the spread and multiplication -of these sites themselves, and the remarkable growth in human -population we deduce from this increase in sites. Well look at some -of these sites and the archeological traces they yield in the next -chapter. When such village sites begin to appear, I believe we are in -the _era of the primary village-farming community_. I also believe this -is the second era of the food-producing stage. - -The first era of the food-producing stage, I believe, was an _era of -incipient cultivation and animal domestication_. I keep saying I -believe because the actual evidence for this earlier era is so slight -that one has to set it up mainly by playing a hunch for it. The reason -for playing the hunch goes about as follows. - -One thing we seem to be able to see, in the food-collecting era in -general, is a tendency for people to begin to settle down. This -settling down seemed to become further intensified in the terminal -era. How this is connected with Professor Mathiassens receptiveness -and the tendency to be experimental, we do not exactly know. The -evidence from the New World comes into play here as well as that from -the Old World. With this settling down in one place, the people of the -terminal era--especially the Forest folk whom we know best--began -making a great variety of new things. I remarked about this earlier in -the chapter. Dr. Robert M. Adams is of the opinion that this atmosphere -of experimentation with new tools--with new ways of collecting food--is -the kind of atmosphere in which one might expect trials at planting -and at animal domestication to have been made. We first begin to find -traces of more permanent life in outdoor camp sites, although caves -were still inhabited at the beginning of the terminal era. It is not -surprising at all that the Forest folk had already domesticated the -dog. In this sense, the whole era of food-collecting was becoming ready -and almost incipient for cultivation and animal domestication. - -Northwestern Europe was not the place for really effective beginnings -in agriculture and animal domestication. These would have had to take -place in one of those natural environments of promise, where a variety -of plants and animals, each possible of domestication, was available in -the wild state. Let me spell this out. Really effective food-production -must include a variety of items to make up a reasonably well-rounded -diet. The food-supply so produced must be trustworthy, even though -the food-producing peoples themselves might be happy to supplement -it with fish and wild strawberries, just as we do when such things -are available. So, as we said earlier, part of our problem is that -of finding a region with a natural environment which includes--and -did include, some ten thousand years ago--a variety of possibly -domesticable wild plants and animals. - - -NUCLEAR AREAS - -Now comes the last of my definitions. A region with a natural -environment which included a variety of wild plants and animals, -both possible and ready for domestication, would be a central -or core or _nuclear area_, that is, it would be when and _if_ -food-production took place within it. It is pretty hard for me to -imagine food-production having ever made an independent start outside -such a nuclear area, although there may be some possible nuclear areas -in which food-production never took place (possibly in parts of Africa, -for example). - -We know of several such nuclear areas. In the New World, Middle America -and the Andean highlands make up one or two; it is my understanding -that the evidence is not yet clear as to which. There seems to have -been a nuclear area somewhere in southeastern Asia, in the Malay -peninsula or Burma perhaps, connected with the early cultivation of -taro, breadfruit, the banana and the mango. Possibly the cultivation -of rice and the domestication of the chicken and of zebu cattle and -the water buffalo belong to this southeast Asiatic nuclear area. We -know relatively little about it archeologically, as yet. The nuclear -area which was the scene of the earliest experiment in effective -food-production was in western Asia. Since I know it best, I shall use -it as my example. - - -THE NUCLEAR NEAR EAST - -The nuclear area of western Asia is naturally the one of greatest -interest to people of the western cultural tradition. Our cultural -heritage began within it. The area itself is the region of the hilly -flanks of rain-watered grass-land which build up to the high mountain -ridges of Iran, Iraq, Turkey, Syria, and Palestine. The map on page -125 indicates the region. If you have a good atlas, try to locate the -zone which surrounds the drainage basin of the Tigris and Euphrates -Rivers at elevations of from approximately 2,000 to 5,000 feet. The -lower alluvial land of the Tigris-Euphrates basin itself has very -little rainfall. Some years ago Professor James Henry Breasted called -the alluvial lands of the Tigris-Euphrates a part of the fertile -crescent. These alluvial lands are very fertile if irrigated. Breasted -was most interested in the oriental civilizations of conventional -ancient history, and irrigation had been discovered before they -appeared. - -The country of hilly flanks above Breasteds crescent receives from -10 to 20 or more inches of winter rainfall each year, which is about -what Kansas has. Above the hilly-flanks zone tower the peaks and ridges -of the Lebanon-Amanus chain bordering the coast-line from Palestine -to Turkey, the Taurus Mountains of southern Turkey, and the Zagros -range of the Iraq-Iran borderland. This rugged mountain frame for our -hilly-flanks zone rises to some magnificent alpine scenery, with peaks -of from ten to fifteen thousand feet in elevation. There are several -gaps in the Mediterranean coastal portion of the frame, through which -the winters rain-bearing winds from the sea may break so as to carry -rain to the foothills of the Taurus and the Zagros. - -The picture I hope you will have from this description is that of an -intermediate hilly-flanks zone lying between two regions of extremes. -The lower Tigris-Euphrates basin land is low and far too dry and hot -for agriculture based on rainfall alone; to the south and southwest, it -merges directly into the great desert of Arabia. The mountains which -lie above the hilly-flanks zone are much too high and rugged to have -encouraged farmers. - - -THE NATURAL ENVIRONMENT OF THE NUCLEAR NEAR EAST - -The more we learn of this hilly-flanks zone that I describe, the -more it seems surely to have been a nuclear area. This is where we -archeologists need, and are beginning to get, the help of natural -scientists. They are coming to the conclusion that the natural -environment of the hilly-flanks zone today is much as it was some eight -to ten thousand years ago. There are still two kinds of wild wheat and -a wild barley, and the wild sheep, goat, and pig. We have discovered -traces of each of these at about nine thousand years ago, also traces -of wild ox, horse, and dog, each of which appears to be the probable -ancestor of the domesticated form. In fact, at about nine thousand -years ago, the two wheats, the barley, and at least the goat, were -already well on the road to domestication. - -The wild wheats give us an interesting clue. They are only available -together with the wild barley within the hilly-flanks zone. While the -wild barley grows in a variety of elevations and beyond the zone, -at least one of the wild wheats does not seem to grow below the hill -country. As things look at the moment, the domestication of both the -wheats together could _only_ have taken place within the hilly-flanks -zone. Barley seems to have first come into cultivation due to its -presence as a weed in already cultivated wheat fields. There is also -a suggestion--there is still much more to learn in the matter--that -the animals which were first domesticated were most at home up in the -hilly-flanks zone in their wild state. - -With a single exception--that of the dog--the earliest positive -evidence of domestication includes the two forms of wheat, the barley, -and the goat. The evidence comes from within the hilly-flanks zone. -However, it comes from a settled village proper, Jarmo (which Ill -describe in the next chapter), and is thus from the era of the primary -village-farming community. We are still without positive evidence of -domesticated grain and animals in the first era of the food-producing -stage, that of incipient cultivation and animal domestication. - - -THE ERA OF INCIPIENT CULTIVATION AND ANIMAL DOMESTICATION - -I said above (p. 105) that my era of incipient cultivation and animal -domestication is mainly set up by playing a hunch. Although we cannot -really demonstrate it--and certainly not in the Near East--it would -be very strange for food-collectors not to have known a great deal -about the plants and animals most useful to them. They do seem to have -domesticated the dog. We can easily imagine them remembering to go -back, season after season, to a particular patch of ground where seeds -or acorns or berries grew particularly well. Most human beings, unless -they are extremely hungry, are attracted to baby animals, and many wild -pups or fawns or piglets must have been brought back alive by hunting -parties. - -In this last sense, man has probably always been an incipient -cultivator and domesticator. But I believe that Adams is right in -suggesting that this would be doubly true with the experimenters of -the terminal era of food-collecting. We noticed that they also seem -to have had a tendency to settle down. Now my hunch goes that _when_ -this experimentation and settling down took place within a potential -nuclear area--where a whole constellation of plants and animals -possible of domestication was available--the change was easily made. -Professor Charles A. Reed, our field colleague in zoology, agrees that -year-round settlement with plant domestication probably came before -there were important animal domestications. - - -INCIPIENT ERAS AND NUCLEAR AREAS - -I have put this scheme into a simple chart (p. 111) with the names -of a few of the sites we are going to talk about. You will see that my -hunch means that there are eras of incipient cultivation _only_ within -nuclear areas. In a nuclear area, the terminal era of food-collecting -would probably have been quite short. I do not know for how long a time -the era of incipient cultivation and domestication would have lasted, -but perhaps for several thousand years. Then it passed on into the era -of the primary village-farming community. - -Outside a nuclear area, the terminal era of food-collecting would last -for a long time; in a few out-of-the-way parts of the world, it still -hangs on. It would end in any particular place through contact with -and the spread of ideas of people who had passed on into one of the -more developed eras. In many cases, the terminal era of food-collecting -was ended by the incoming of the food-producing peoples themselves. -For example, the practices of food-production were carried into Europe -by the actual movement of some numbers of peoples (we dont know how -many) who had reached at least the level of the primary village-farming -community. The Forest folk learned food-production from them. There -was never an era of incipient cultivation and domestication proper in -Europe, if my hunch is right. - - -ARCHEOLOGICAL DIFFICULTIES IN SEEING THE INCIPIENT ERA - -The way I see it, two things were required in order that an era of -incipient cultivation and domestication could begin. First, there had -to be the natural environment of a nuclear area, with its whole group -of plants and animals capable of domestication. This is the aspect of -the matter which weve said is directly given by nature. But it is -quite possible that such an environment with such a group of plants -and animals in it may have existed well before ten thousand years ago -in the Near East. It is also quite possible that the same promising -condition may have existed in regions which never developed into -nuclear areas proper. Here, again, we come back to the cultural factor. -I think it was that atmosphere of experimentation weve talked about -once or twice before. I cant define it for you, other than to say that -by the end of the Ice Age, the general level of many cultures was ready -for change. Ask me how and why this was so, and Ill tell you we dont -know yet, and that if we did understand this kind of question, there -would be no need for me to go on being a prehistorian! - -[Illustration: POSSIBLE RELATIONSHIPS OF STAGES AND ERAS IN WESTERN -ASIA AND NORTHEASTERN AFRICA] - -Now since this was an era of incipience, of the birth of new ideas, -and of experimentation, it is very difficult to see its traces -archeologically. New tools having to do with the new ways of getting -and, in fact, producing food would have taken some time to develop. -It need not surprise us too much if we cannot find hoes for planting -and sickles for reaping grain at the very beginning. We might expect -a time of making-do with some of the older tools, or with make-shift -tools, for some of the new jobs. The present-day wild cousin of the -domesticated sheep still lives in the mountains of western Asia. It has -no wool, only a fine down under hair like that of a deer, so it need -not surprise us to find neither the whorls used for spinning nor traces -of woolen cloth. It must have taken some time for a wool-bearing sheep -to develop and also time for the invention of the new tools which go -with weaving. It would have been the same with other kinds of tools for -the new way of life. - -It is difficult even for an experienced comparative zoologist to tell -which are the bones of domesticated animals and which are those of -their wild cousins. This is especially so because the animal bones the -archeologists find are usually fragmentary. Furthermore, we do not have -a sort of library collection of the skeletons of the animals or an -herbarium of the plants of those times, against which the traces which -the archeologists find may be checked. We are only beginning to get -such collections for the modern wild forms of animals and plants from -some of our nuclear areas. In the nuclear area in the Near East, some -of the wild animals, at least, have already become extinct. There are -no longer wild cattle or wild horses in western Asia. We know they were -there from the finds weve made in caves of late Ice Age times, and -from some slightly later sites. - - -SITES WITH ANTIQUITIES OF THE INCIPIENT ERA - -So far, we know only a very few sites which would suit my notion of the -incipient era of cultivation and animal domestication. I am closing -this chapter with descriptions of two of the best Near Eastern examples -I know of. You may not be satisfied that what I am able to describe -makes a full-bodied era of development at all. Remember, however, that -Ive told you Im largely playing a kind of a hunch, and also that the -archeological materials of this era will always be extremely difficult -to interpret. At the beginning of any new way of life, there will be a -great tendency for people to make-do, at first, with tools and habits -they are already used to. I would suspect that a great deal of this -making-do went on almost to the end of this era. - - -THE NATUFIAN, AN ASSEMBLAGE OF THE INCIPIENT ERA - -The assemblage called the Natufian comes from the upper layers of a -number of caves in Palestine. Traces of its flint industry have also -turned up in Syria and Lebanon. We dont know just how old it is. I -guess that it probably falls within five hundred years either way of -about 5000 B.C. - -Until recently, the people who produced the Natufian assemblage were -thought to have been only cave dwellers, but now at least three open -air Natufian sites have been briefly described. In their best-known -dwelling place, on Mount Carmel, the Natufian folk lived in the open -mouth of a large rock-shelter and on the terrace in front of it. On the -terrace, they had set at least two short curving lines of stones; but -these were hardly architecture; they seem more like benches or perhaps -the low walls of open pens. There were also one or two small clusters -of stones laid like paving, and a ring of stones around a hearth or -fireplace. One very round and regular basin-shaped depression had been -cut into the rocky floor of the terrace, and there were other less -regular basin-like depressions. In the newly reported open air sites, -there seem to have been huts with rounded corners. - -Most of the finds in the Natufian layer of the Mount Carmel cave were -flints. About 80 per cent of these flint tools were microliths made -by the regular working of tiny blades into various tools, some having -geometric forms. The larger flint tools included backed blades, burins, -scrapers, a few arrow points, some larger hacking or picking tools, and -one special type. This last was the sickle blade. - -We know a sickle blade of flint when we see one, because of a strange -polish or sheen which seems to develop on the cutting edge when the -blade has been used to cut grasses or grain, or--perhaps--reeds. In -the Natufian, we have even found the straight bone handles in which a -number of flint sickle blades were set in a line. - -There was a small industry in ground or pecked stone (that is, abraded -not chipped) in the Natufian. This included some pestle and mortar -fragments. The mortars are said to have a deep and narrow hole, -and some of the pestles show traces of red ochre. We are not sure -that these mortars and pestles were also used for grinding food. In -addition, there were one or two bits of carving in stone. - - -NATUFIAN ANTIQUITIES IN OTHER MATERIALS; BURIALS AND PEOPLE - -The Natufian industry in bone was quite rich. It included, beside the -sickle hafts mentioned above, points and harpoons, straight and curved -types of fish-hooks, awls, pins and needles, and a variety of beads and -pendants. There were also beads and pendants of pierced teeth and shell. - -A number of Natufian burials have been found in the caves; some burials -were grouped together in one grave. The people who were buried within -the Mount Carmel cave were laid on their backs in an extended position, -while those on the terrace seem to have been flexed (placed in their -graves in a curled-up position). This may mean no more than that it was -easier to dig a long hole in cave dirt than in the hard-packed dirt of -the terrace. The people often had some kind of object buried with them, -and several of the best collections of beads come from the burials. On -two of the skulls there were traces of elaborate head-dresses of shell -beads. - -[Illustration: SKETCH OF NATUFIAN ASSEMBLAGE - - MICROLITHS - ARCHITECTURE? - BURIAL - CHIPPED STONE - GROUND STONE - BONE] - -The animal bones of the Natufian layers show beasts of a modern type, -but with some differences from those of present-day Palestine. The -bones of the gazelle far outnumber those of the deer; since gazelles -like a much drier climate than deer, Palestine must then have had much -the same climate that it has today. Some of the animal bones were those -of large or dangerous beasts: the hyena, the bear, the wild boar, -and the leopard. But the Natufian people may have had the help of a -large domesticated dog. If our guess at a date for the Natufian is -right (about 7750 B.C.), this is an earlier dog than was that in the -Maglemosian of northern Europe. More recently, it has been reported -that a domesticated goat is also part of the Natufian finds. - -The study of the human bones from the Natufian burials is not yet -complete. Until Professor McCowns study becomes available, we may note -Professor Coons assessment that these people were of a basically -Mediterranean type. - - -THE KARIM SHAHIR ASSEMBLAGE - -Karim Shahir differs from the Natufian sites in that it shows traces -of a temporary open site or encampment. It lies on the top of a bluff -in the Kurdish hill-country of northeastern Iraq. It was dug by Dr. -Bruce Howe of the expedition I directed in 1950-51 for the Oriental -Institute and the American Schools of Oriental Research. In 1954-55, -our expedition located another site, Mlefaat, with general resemblance -to Karim Shahir, but about a hundred miles north of it. In 1956, Dr. -Ralph Solecki located still another Karim Shahir type of site called -Zawi Chemi Shanidar. The Zawi Chemi site has a radiocarbon date of 8900 - 300 B.C. - -Karim Shahir has evidence of only one very shallow level of occupation. -It was probably not lived on very long, although the people who lived -on it spread out over about three acres of area. In spots, the single -layer yielded great numbers of fist-sized cracked pieces of limestone, -which had been carried up from the bed of a stream at the bottom of the -bluff. We think these cracked stones had something to do with a kind of -architecture, but we were unable to find positive traces of hut plans. -At Mlefaat and Zawi Chemi, there were traces of rounded hut plans. - -As in the Natufian, the great bulk of small objects of the Karim Shahir -assemblage was in chipped flint. A large proportion of the flint tools -were microlithic bladelets and geometric forms. The flint sickle blade -was almost non-existent, being far scarcer than in the Natufian. The -people of Karim Shahir did a modest amount of work in the grinding of -stone; there were milling stone fragments of both the mortar and the -quern type, and stone hoes or axes with polished bits. Beads, pendants, -rings, and bracelets were made of finer quality stone. We found a few -simple points and needles of bone, and even two rather formless unbaked -clay figurines which seemed to be of animal form. - -[Illustration: SKETCH OF KARIM SHAHIR ASSEMBLAGE - - CHIPPED STONE - GROUND STONE - UNBAKED CLAY - SHELL - BONE - ARCHITECTURE] - -Karim Shahir did not yield direct evidence of the kind of vegetable -food its people ate. The animal bones showed a considerable -increase in the proportion of the bones of the species capable of -domestication--sheep, goat, cattle, horse, dog--as compared with animal -bones from the earlier cave sites of the area, which have a high -proportion of bones of wild forms like deer and gazelle. But we do not -know that any of the Karim Shahir animals were actually domesticated. -Some of them may have been, in an incipient way, but we have no means -at the moment that will tell us from the bones alone. - - -WERE THE NATUFIAN AND KARIM SHAHIR PEOPLES FOOD-PRODUCERS? - -It is clear that a great part of the food of the Natufian people -must have been hunted or collected. Shells of land, fresh-water, and -sea animals occur in their cave layers. The same is true as regards -Karim Shahir, save for sea shells. But on the other hand, we have -the sickles, the milling stones, the possible Natufian dog, and the -goat, and the general animal situation at Karim Shahir to hint at an -incipient approach to food-production. At Karim Shahir, there was the -tendency to settle down out in the open; this is echoed by the new -reports of open air Natufian sites. The large number of cracked stones -certainly indicates that it was worth the peoples while to have some -kind of structure, even if the site as a whole was short-lived. - -It is a part of my hunch that these things all point toward -food-production--that the hints we seek are there. But in the sense -that the peoples of the era of the primary village-farming community, -which we shall look at next, are fully food-producing, the Natufian -and Karim Shahir folk had not yet arrived. I think they were part of -a general build-up to full scale food-production. They were possibly -controlling a few animals of several kinds and perhaps one or two -plants, without realizing the full possibilities of this control as a -new way of life. - -This is why I think of the Karim Shahir and Natufian folk as being at -a level, or in an era, of incipient cultivation and domestication. But -we shall have to do a great deal more excavation in this range of time -before well get the kind of positive information we need. - - -SUMMARY - -I am sorry that this chapter has had to be so much more about ideas -than about the archeological traces of prehistoric men themselves. -But the antiquities of the incipient era of cultivation and animal -domestication will not be spectacular, even when we do have them -excavated in quantity. Few museums will be interested in these -antiquities for exhibition purposes. The charred bits or impressions -of plants, the fragments of animal bone and shell, and the varied -clues to climate and environment will be as important as the artifacts -themselves. It will be the ideas to which these traces lead us that -will be important. I am sure that this unspectacular material--when we -have much more of it, and learn how to understand what it says--will -lead us to how and why answers about the first great change in human -history. - -We know the earliest village-farming communities appeared in western -Asia, in a nuclear area. We do not yet know why the Near Eastern -experiment came first, or why it didnt happen earlier in some other -nuclear area. Apparently, the level of culture and the promise of the -natural environment were ready first in western Asia. The next sites -we look at will show a simple but effective food-production already -in existence. Without effective food-production and the settled -village-farming communities, civilization never could have followed. -How effective food-production came into being by the end of the -incipient era, is, I believe, one of the most fascinating questions any -archeologist could face. - -It now seems probable--from possibly two of the Palestinian sites with -varieties of the Natufian (Jericho and Nahal Oren)--that there were -one or more local Palestinian developments out of the Natufian into -later times. In the same way, what followed after the Karim Shahir type -of assemblage in northeastern Iraq was in some ways a reflection of -beginnings made at Karim Shahir and Zawi Chemi. - - - - -THE First Revolution - -[Illustration] - - -As the incipient era of cultivation and animal domestication passed -onward into the era of the primary village-farming community, the first -basic change in human economy was fully achieved. In southwestern Asia, -this seems to have taken place about nine thousand years ago. I am -going to restrict my description to this earliest Near Eastern case--I -do not know enough about the later comparable experiments in the Far -East and in the New World. Let us first, once again, think of the -contrast between food-collecting and food-producing as ways of life. - - -THE DIFFERENCE BETWEEN FOOD-COLLECTORS AND FOOD-PRODUCERS - -Childe used the word revolution because of the radical change that -took place in the habits and customs of man. Food-collectors--that is, -hunters, fishers, berry- and nut-gatherers--had to live in small groups -or bands, for they had to be ready to move wherever their food supply -moved. Not many people can be fed in this way in one area, and small -children and old folks are a burden. There is not enough food to store, -and it is not the kind that can be stored for long. - -Do you see how this all fits into a picture? Small groups of people -living now in this cave, now in that--or out in the open--as they moved -after the animals they hunted; no permanent villages, a few half-buried -huts at best; no breakable utensils; no pottery; no signs of anything -for clothing beyond the tools that were probably used to dress the -skins of animals; no time to think of much of anything but food and -protection and disposal of the dead when death did come: an existence -which takes nature as it finds it, which does little or nothing to -modify nature--all in all, a savages existence, and a very tough one. -A man who spends his whole life following animals just to kill them to -eat, or moving from one berry patch to another, is really living just -like an animal himself. - - -THE FOOD-PRODUCING ECONOMY - -Against this picture let me try to draw another--that of mans life -after food-production had begun. His meat was stored on the hoof, -his grain in silos or great pottery jars. He lived in a house: it was -worth his while to build one, because he couldnt move far from his -fields and flocks. In his neighborhood enough food could be grown -and enough animals bred so that many people were kept busy. They all -lived close to their flocks and fields, in a village. The village was -already of a fair size, and it was growing, too. Everybody had more to -eat; they were presumably all stronger, and there were more children. -Children and old men could shepherd the animals by day or help with -the lighter work in the fields. After the crops had been harvested the -younger men might go hunting and some of them would fish, but the food -they brought in was only an addition to the food in the village; the -villagers wouldnt starve, even if the hunters and fishermen came home -empty-handed. - -There was more time to do different things, too. They began to modify -nature. They made pottery out of raw clay, and textiles out of hair -or fiber. People who became good at pottery-making traded their pots -for food and spent all of their time on pottery alone. Other people -were learning to weave cloth or to make new tools. There were already -people in the village who were becoming full-time craftsmen. - -Other things were changing, too. The villagers must have had -to agree on new rules for living together. The head man of the -village had problems different from those of the chief of the small -food-collectors band. If somebodys flock of sheep spoiled a wheat -field, the owner wanted payment for the grain he lost. The chief of -the hunters was never bothered with such questions. Even the gods -had changed. The spirits and the magic that had been used by hunters -werent of any use to the villagers. They needed gods who would watch -over the fields and the flocks, and they eventually began to erect -buildings where their gods might dwell, and where the men who knew most -about the gods might live. - - -WAS FOOD-PRODUCTION A REVOLUTION? - -If you can see the difference between these two pictures--between -life in the food-collecting stage and life after food-production -had begun--youll see why Professor Childe speaks of a revolution. -By revolution, he doesnt mean that it happened over night or that -it happened only once. We dont know exactly how long it took. Some -people think that all these changes may have occurred in less than -500 years, but I doubt that. The incipient era was probably an affair -of some duration. Once the level of the village-farming community had -been established, however, things did begin to move very fast. By -six thousand years ago, the descendants of the first villagers had -developed irrigation and plow agriculture in the relatively rainless -Mesopotamian alluvium and were living in towns with temples. Relative -to the half million years of food-gathering which lay behind, this had -been achieved with truly revolutionary suddenness. - - -GAPS IN OUR KNOWLEDGE OF THE NEAR EAST - -If youll look again at the chart (p. 111) youll see that I have -very few sites and assemblages to name in the incipient era of -cultivation and domestication, and not many in the earlier part of -the primary village-farming level either. Thanks in no small part -to the intelligent co-operation given foreign excavators by the -Iraq Directorate General of Antiquities, our understanding of the -sequence in Iraq is growing more complete. I shall use Iraq as my main -yard-stick here. But I am far from being able to show you a series of -Sears Roebuck catalogues, even century by century, for any part of -the nuclear area. There is still a great deal of earth to move, and a -great mass of material to recover and interpret before we even begin to -understand how and why. - -Perhaps here, because this kind of archeology is really my specialty, -youll excuse it if I become personal for a moment. I very much look -forward to having further part in closing some of the gaps in knowledge -of the Near East. This is not, as Ive told you, the spectacular -range of Near Eastern archeology. There are no royal tombs, no gold, -no great buildings or sculpture, no writing, in fact nothing to -excite the normal museum at all. Nevertheless it is a range which, -idea-wise, gives the archeologist tremendous satisfaction. The country -of the hilly flanks is an exciting combination of green grasslands -and mountainous ridges. The Kurds, who inhabit the part of the area -in which Ive worked most recently, are an extremely interesting and -hospitable people. Archeologists dont become rich, but Ill forego -the Cadillac for any bright spring morning in the Kurdish hills, on a -good site with a happy crew of workmen and an interested and efficient -staff. It is probably impossible to convey the full feeling which life -on such a dig holds--halcyon days for the body and acute pleasurable -stimulation for the mind. Old things coming newly out of the good dirt, -and the pieces of the human puzzle fitting into place! I think I am -an honest man; I cannot tell you that I am sorry the job is not yet -finished and that there are still gaps in this part of the Near Eastern -archeological sequence. - - -EARLIEST SITES OF THE VILLAGE FARMERS - -So far, the Karim Shahir type of assemblage, which we looked at in the -last chapter, is the earliest material available in what I take to -be the nuclear area. We do not believe that Karim Shahir was a village -site proper: it looks more like the traces of a temporary encampment. -Two caves, called Belt and Hotu, which are outside the nuclear area -and down on the foreshore of the Caspian Sea, have been excavated -by Professor Coon. These probably belong in the later extension of -the terminal era of food-gathering; in their upper layers are traits -like the use of pottery borrowed from the more developed era of the -same time in the nuclear area. The same general explanation doubtless -holds true for certain materials in Egypt, along the upper Nile and in -the Kharga oasis: these materials, called Sebilian III, the Khartoum -neolithic, and the Khargan microlithic, are from surface sites, -not from caves. The chart (p. 111) shows where I would place these -materials in era and time. - -[Illustration: THE HILLY FLANKS OF THE CRESCENT AND EARLY SITES OF THE -NEAR EAST] - -Both Mlefaat and Dr. Soleckis Zawi Chemi Shanidar site appear to have -been slightly more settled in than was Karim Shahir itself. But I do -not think they belong to the era of farming-villages proper. The first -site of this era, in the hills of Iraqi Kurdistan, is Jarmo, on which -we have spent three seasons of work. Following Jarmo comes a variety of -sites and assemblages which lie along the hilly flanks of the crescent -and just below it. I am going to describe and illustrate some of these -for you. - -Since not very much archeological excavation has yet been done on sites -of this range of time, I shall have to mention the names of certain -single sites which now alone stand for an assemblage. This does not -mean that I think the individual sites I mention were unique. In the -times when their various cultures flourished, there must have been -many little villages which shared the same general assemblage. We are -only now beginning to locate them again. Thus, if I speak of Jarmo, -or Jericho, or Sialk as single examples of their particular kinds of -assemblages, I dont mean that they were unique at all. I think I could -take you to the sites of at least three more Jarmos, within twenty -miles of the original one. They are there, but they simply havent yet -been excavated. In 1956, a Danish expedition discovered material of -Jarmo type at Shimshara, only two dozen miles northeast of Jarmo, and -below an assemblage of Hassunan type (which I shall describe presently). - - -THE GAP BETWEEN KARIM SHAHIR AND JARMO - -As we see the matter now, there is probably still a gap in the -available archeological record between the Karim Shahir-Mlefaat-Zawi -Chemi group (of the incipient era) and that of Jarmo (of the -village-farming era). Although some items of the Jarmo type materials -do reflect the beginnings of traditions set in the Karim Shahir group -(see p. 120), there is not a clear continuity. Moreover--to the -degree that we may trust a few radiocarbon dates--there would appear -to be around two thousand years of difference in time. The single -available Zawi Chemi date is 8900 300 B.C.; the most reasonable -group of dates from Jarmo average to about 6750 200 B.C. I am -uncertain about this two thousand years--I do not think it can have -been so long. - -This suggests that we still have much work to do in Iraq. You can -imagine how earnestly we await the return of political stability in the -Republic of Iraq. - - -JARMO, IN THE KURDISH HILLS, IRAQ - -The site of Jarmo has a depth of deposit of about twenty-seven feet, -and approximately a dozen layers of architectural renovation and -change. Nevertheless it is a one period site: its assemblage remains -essentially the same throughout, although one or two new items are -added in later levels. It covers about four acres of the top of a -bluff, below which runs a small stream. Jarmo lies in the hill country -east of the modern oil town of Kirkuk. The Iraq Directorate General of -Antiquities suggested that we look at it in 1948, and we have had three -seasons of digging on it since. - -The people of Jarmo grew the barley plant and two different kinds of -wheat. They made flint sickles with which to reap their grain, mortars -or querns on which to crack it, ovens in which it might be parched, and -stone bowls out of which they might eat their porridge. We are sure -that they had the domesticated goat, but Professor Reed (the staff -zoologist) is not convinced that the bones of the other potentially -domesticable animals of Jarmo--sheep, cattle, pig, horse, dog--show -sure signs of domestication. We had first thought that all of these -animals were domesticated ones, but Reed feels he must find out much -more before he can be sure. As well as their grain and the meat from -their animals, the people of Jarmo consumed great quantities of land -snails. Botanically, the Jarmo wheat stands about half way between -fully bred wheat and the wild forms. - - -ARCHITECTURE: HALL-MARK OF THE VILLAGE - -The sure sign of the village proper is in its traces of architectural -permanence. The houses of Jarmo were only the size of a small cottage -by our standards, but each was provided with several rectangular rooms. -The walls of the houses were made of puddled mud, often set on crude -foundations of stone. (The puddled mud wall, which the Arabs call -_touf_, is built by laying a three to six inch course of soft mud, -letting this sun-dry for a day or two, then adding the next course, -etc.) The village probably looked much like the simple Kurdish farming -village of today, with its mud-walled houses and low mud-on-brush -roofs. I doubt that the Jarmo village had more than twenty houses at -any one moment of its existence. Today, an average of about seven -people live in a comparable Kurdish house; probably the population of -Jarmo was about 150 people. - -[Illustration: SKETCH OF JARMO ASSEMBLAGE - - CHIPPED STONE - UNBAKED CLAY - GROUND STONE - POTTERY _UPPER THIRD OF SITE ONLY._ - REED MATTING - BONE - ARCHITECTURE] - -It is interesting that portable pottery does not appear until the -last third of the life of the Jarmo village. Throughout the duration -of the village, however, its people had experimented with the plastic -qualities of clay. They modeled little figurines of animals and of -human beings in clay; one type of human figurine they favored was that -of a markedly pregnant woman, probably the expression of some sort of -fertility spirit. They provided their house floors with baked-in-place -depressions, either as basins or hearths, and later with domed ovens of -clay. As weve noted, the houses themselves were of clay or mud; one -could almost say they were built up like a house-sized pot. Then, -finally, the idea of making portable pottery itself appeared, although -I very much doubt that the people of the Jarmo village discovered the -art. - -On the other hand, the old tradition of making flint blades and -microlithic tools was still very strong at Jarmo. The sickle-blade was -made in quantities, but so also were many of the much older tool types. -Strangely enough, it is within this age-old category of chipped stone -tools that we see one of the clearest pointers to a newer age. Many of -the Jarmo chipped stone tools--microliths--were made of obsidian, a -black volcanic natural glass. The obsidian beds nearest to Jarmo are -over three hundred miles to the north. Already a bulk carrying trade -had been established--the forerunner of commerce--and the routes were -set by which, in later times, the metal trade was to move. - -There are now twelve radioactive carbon dates from Jarmo. The most -reasonable cluster of determinations averages to about 6750 200 -B.C., although there is a completely unreasonable range of dates -running from 3250 to 9250 B.C.! _If_ I am right in what I take to be -reasonable, the first flush of the food-producing revolution had been -achieved almost nine thousand years ago. - - -HASSUNA, IN UPPER MESOPOTAMIAN IRAQ - -We are not sure just how soon after Jarmo the next assemblage of Iraqi -material is to be placed. I do not think the time was long, and there -are a few hints that detailed habits in the making of pottery and -ground stone tools were actually continued from Jarmo times into the -time of the next full assemblage. This is called after a site named -Hassuna, a few miles to the south and west of modern Mosul. We also -have Hassunan type materials from several other sites in the same -general region. It is probably too soon to make generalizations about -it, but the Hassunan sites seem to cluster at slightly lower elevations -than those we have been talking about so far. - -The catalogue of the Hassuna assemblage is of course more full and -elaborate than that of Jarmo. The Iraqi governments archeologists -who dug Hassuna itself, exposed evidence of increasing architectural -know-how. The walls of houses were still formed of puddled mud; -sun-dried bricks appear only in later periods. There were now several -different ways of making and decorating pottery vessels. One style of -pottery painting, called the Samarran style, is an extremely handsome -one and must have required a great deal of concentration and excellence -of draftsmanship. On the other hand, the old habits for the preparation -of good chipped stone tools--still apparent at Jarmo--seem to have -largely disappeared by Hassunan times. The flint work of the Hassunan -catalogue is, by and large, a wretched affair. We might guess that the -kinaesthetic concentration of the Hassuna craftsmen now went into other -categories; that is, they suddenly discovered they might have more fun -working with the newer materials. Its a shame, for example, that none -of their weaving is preserved for us. - -The two available radiocarbon determinations from Hassunan contexts -stand at about 5100 and 5600 B.C. 250 years. - - -OTHER EARLY VILLAGE SITES IN THE NUCLEAR AREA - -Ill now name and very briefly describe a few of the other early -village assemblages either in or adjacent to the hilly flanks of the -crescent. Unfortunately, we do not have radioactive carbon dates for -many of these materials. We may guess that some particular assemblage, -roughly comparable to that of Hassuna, for example, must reflect a -culture which lived at just about the same time as that of Hassuna. We -do this guessing on the basis of the general similarity and degree of -complexity of the Sears Roebuck catalogues of the particular assemblage -and that of Hassuna. We suppose that for sites near at hand and of a -comparable cultural level, as indicated by their generally similar -assemblages, the dating must be about the same. We may also know that -in a general stratigraphic sense, the sites in question may both appear -at the bottom of the ascending village sequence in their respective -areas. Without a number of consistent radioactive carbon dates, we -cannot be precise about priorities. - -[Illustration: SKETCH OF HASSUNA ASSEMBLAGE - - POTTERY - POTTERY OBJECTS - CHIPPED STONE - BONE - GROUND STONE - ARCHITECTURE - REED MATTING - BURIAL] - -The ancient mound at Jericho, in the Dead Sea valley in Palestine, -yields some very interesting material. Its catalogue somewhat resembles -that of Jarmo, especially in the sense that there is a fair depth -of deposit without portable pottery vessels. On the other hand, the -architecture of Jericho is surprisingly complex, with traces of massive -stone fortification walls and the general use of formed sun-dried -mud brick. Jericho lies in a somewhat strange and tropically lush -ecological niche, some seven hundred feet below sea level; it is -geographically within the hilly-flanks zone but environmentally not -part of it. - -Several radiocarbon dates for Jericho fall within the range of those -I find reasonable for Jarmo, and their internal statistical consistency -is far better than that for the Jarmo determinations. It is not yet -clear exactly what this means. - -The mound at Jericho (Tell es-Sultan) contains a remarkably -fine sequence, which perhaps does not have the gap we noted in -Iraqi-Kurdistan between the Karim Shahir group and Jarmo. While I am -not sure that the Jericho sequence will prove valid for those parts -of Palestine outside the special Dead Sea environmental niche, the -sequence does appear to proceed from the local variety of Natufian into -that of a very well settled community. So far, we have little direct -evidence for the food-production basis upon which the Jericho people -subsisted. - -There is an early village assemblage with strong characteristics of its -own in the land bordering the northeast corner of the Mediterranean -Sea, where Syria and the Cilician province of Turkey join. This early -Syro-Cilician assemblage must represent a general cultural pattern -which was at least in part contemporary with that of the Hassuna -assemblage. These materials from the bases of the mounds at Mersin, and -from Judaidah in the Amouq plain, as well as from a few other sites, -represent the remains of true villages. The walls of their houses were -built of puddled mud, but some of the house foundations were of stone. -Several different kinds of pottery were made by the people of these -villages. None of it resembles the pottery from Hassuna or from the -upper levels of Jarmo or Jericho. The Syro-Cilician people had not -lost their touch at working flint. An important southern variation of -the Syro-Cilician assemblage has been cleared recently at Byblos, a -port town famous in later Phoenician times. There are three radiocarbon -determinations which suggest that the time range for these developments -was in the sixth or early fifth millennium B.C. - -It would be fascinating to search for traces of even earlier -village-farming communities and for the remains of the incipient -cultivation era, in the Syro-Cilician region. - - -THE IRANIAN PLATEAU AND THE NILE VALLEY - -The map on page 125 shows some sites which lie either outside or in -an extension of the hilly-flanks zone proper. From the base of the -great mound at Sialk on the Iranian plateau came an assemblage of -early village material, generally similar, in the kinds of things it -contained, to the catalogues of Hassuna and Judaidah. The details of -how things were made are different; the Sialk assemblage represents -still another cultural pattern. I suspect it appeared a bit later -in time than did that of Hassuna. There is an important new item in -the Sialk catalogue. The Sialk people made small drills or pins of -hammered copper. Thus the metallurgists specialized craft had made its -appearance. - -There is at least one very early Iranian site on the inward slopes -of the hilly-flanks zone. It is the earlier of two mounds at a place -called Bakun, in southwestern Iran; the results of the excavations -there are not yet published and we only know of its coarse and -primitive pottery. I only mention Bakun because it helps us to plot the -extent of the hilly-flanks zone villages on the map. - -The Nile Valley lies beyond the peculiar environmental zone of the -hilly flanks of the crescent, and it is probable that the earliest -village-farming communities in Egypt were established by a few people -who wandered into the Nile delta area from the nuclear area. The -assemblage which is most closely comparable to the catalogue of Hassuna -or Judaidah, for example, is that from little settlements along the -shore of the Fayum lake. The Fayum materials come mainly from grain -bins or silos. Another site, Merimde, in the western part of the Nile -delta, shows the remains of a true village, but it may be slightly -later than the settlement of the Fayum. There are radioactive carbon -dates for the Fayum materials at about 4275 B.C. 320 years, which -is almost fifteen hundred years later than the determinations suggested -for the Hassunan or Syro-Cilician assemblages. I suspect that this -is a somewhat over-extended indication of the time it took for the -generalized cultural pattern of village-farming community life to -spread from the nuclear area down into Egypt, but as yet we have no way -of testing these matters. - -In this same vein, we have two radioactive carbon dates for an -assemblage from sites near Khartoum in the Sudan, best represented by -the mound called Shaheinab. The Shaheinab catalogue roughly corresponds -to that of the Fayum; the distance between the two places, as the Nile -flows, is roughly 1,500 miles. Thus it took almost a thousand years for -the new way of life to be carried as far south into Africa as Khartoum; -the two Shaheinab dates average about 3300 B.C. 400 years. - -If the movement was up the Nile (southward), as these dates suggest, -then I suspect that the earliest available village material of middle -Egypt, the so-called Tasian, is also later than that of the Fayum. The -Tasian materials come from a few graves near a village called Deir -Tasa, and I have an uncomfortable feeling that the Tasian assemblage -may be mainly an artificial selection of poor examples of objects which -belong in the following range of time. - - -SPREAD IN TIME AND SPACE - -There are now two things we can do; in fact, we have already begun to -do them. We can watch the spread of the new way of life upward through -time in the nuclear area. We can also see how the new way of life -spread outward in space from the nuclear area, as time went on. There -is good archeological evidence that both these processes took place. -For the hill country of northeastern Iraq, in the nuclear area, we -have already noticed how the succession (still with gaps) from Karim -Shahir, through Mlefaat and Jarmo, to Hassuna can be charted (see -chart, p. 111). In the next chapter, we shall continue this charting -and description of what happened in Iraq upward through time. We also -watched traces of the new way of life move through space up the Nile -into Africa, to reach Khartoum in the Sudan some thirty-five hundred -years later than we had seen it at Jarmo or Jericho. We caught glimpses -of it in the Fayum and perhaps at Tasa along the way. - -For the remainder of this chapter, I shall try to suggest briefly for -you the directions taken by the spread of the new way of life from the -nuclear area in the Near East. First, let me make clear again that -I _do not_ believe that the village-farming community way of life -was invented only once and in the Near East. It seems to me that the -evidence is very clear that a separate experiment arose in the New -World. For China, the question of independence or borrowing--in the -appearance of the village-farming community there--is still an open -one. In the last chapter, we noted the probability of an independent -nuclear area in southeastern Asia. Professor Carl Sauer strongly -champions the great importance of this area as _the_ original center -of agricultural pursuits, as a kind of cradle of all incipient eras -of the Old World at least. While there is certainly not the slightest -archeological evidence to allow us to go that far, we may easily expect -that an early southeast Asian development would have been felt in -China. However, the appearance of the village-farming community in the -northwest of India, at least, seems to have depended on the earlier -development in the Near East. It is also probable that ideas of the new -way of life moved well beyond Khartoum in Africa. - - -THE SPREAD OF THE VILLAGE-FARMING COMMUNITY WAY OF LIFE INTO EUROPE - -How about Europe? I wont give you many details. You can easily imagine -that the late prehistoric prelude to European history is a complicated -affair. We all know very well how complicated an area Europe is now, -with its welter of different languages and cultures. Remember, however, -that a great deal of archeology has been done on the late prehistory of -Europe, and very little on that of further Asia and Africa. If we knew -as much about these areas as we do of Europe, I expect wed find them -just as complicated. - -This much is clear for Europe, as far as the spread of the -village-community way of life is concerned. The general idea and much -of the know-how and the basic tools of food-production moved from the -Near East to Europe. So did the plants and animals which had been -domesticated; they were not naturally at home in Europe, as they were -in western Asia. I do not, of course, mean that there were traveling -salesmen who carried these ideas and things to Europe with a commercial -gleam in their eyes. The process took time, and the ideas and things -must have been passed on from one group of people to the next. There -was also some actual movement of peoples, but we dont know the size of -the groups that moved. - -The story of the colonization of Europe by the first farmers is -thus one of (1) the movement from the eastern Mediterranean lands -of some people who were farmers; (2) the spread of ideas and things -beyond the Near East itself and beyond the paths along which the -colonists moved; and (3) the adaptations of the ideas and things -by the indigenous Forest folk, about whose receptiveness Professor -Mathiassen speaks (p. 97). It is important to note that the resulting -cultures in the new European environment were European, not Near -Eastern. The late Professor Childe remarked that the peoples of the -West were not slavish imitators; they adapted the gifts from the East -... into a new and organic whole capable of developing on its own -original lines. - - -THE WAYS TO EUROPE - -Suppose we want to follow the traces of those earliest village-farmers -who did travel from western Asia into Europe. Let us start from -Syro-Cilicia, that part of the hilly-flanks zone proper which lies in -the very northeastern corner of the Mediterranean. Three ways would be -open to us (of course we could not be worried about permission from the -Soviet authorities!). We would go north, or north and slightly east, -across Anatolian Turkey, and skirt along either shore of the Black Sea -or even to the east of the Caucasus Mountains along the Caspian Sea, -to reach the plains of Ukrainian Russia. From here, we could march -across eastern Europe to the Baltic and Scandinavia, or even hook back -southwestward to Atlantic Europe. - -Our second way from Syro-Cilicia would also lie over Anatolia, to the -northwest, where we would have to swim or raft ourselves over the -Dardanelles or the Bosphorus to the European shore. Then we would bear -left toward Greece, but some of us might turn right again in Macedonia, -going up the valley of the Vardar River to its divide and on down -the valley of the Morava beyond, to reach the Danube near Belgrade -in Jugoslavia. Here we would turn left, following the great river -valley of the Danube up into central Europe. We would have a number of -tributary valleys to explore, or we could cross the divide and go down -the valley of the Rhine to the North Sea. - -Our third way from Syro-Cilicia would be by sea. We would coast along -southern Anatolia and visit Cyprus, Crete, and the Aegean islands on -our way to Greece, where, in the north, we might meet some of those who -had taken the second route. From Greece, we would sail on to Italy and -the western isles, to reach southern France and the coasts of Spain. -Eventually a few of us would sail up the Atlantic coast of Europe, to -reach western Britain and even Ireland. - -[Illustration: PROBABLE ROUTES AND TIMING IN THE SPREAD OF THE -VILLAGE-FARMING COMMUNITY WAY OF LIFE FROM THE NEAR EAST TO EUROPE] - -Of course none of us could ever take these journeys as the first -farmers took them, since the whole course of each journey must have -lasted many lifetimes. The date given to the assemblage called Windmill -Hill, the earliest known trace of village-farming communities in -England, is about 2500 B.C. I would expect about 5500 B.C. to be a -safe date to give for the well-developed early village communities of -Syro-Cilicia. We suspect that the spread throughout Europe did not -proceed at an even rate. Professor Piggott writes that at a date -probably about 2600 B.C., simple agricultural communities were being -established in Spain and southern France, and from the latter region a -spread northwards can be traced ... from points on the French seaboard -of the [English] Channel ... there were emigrations of a certain number -of these tribes by boat, across to the chalk lands of Wessex and Sussex -[in England], probably not more than three or four generations later -than the formation of the south French colonies. - -New radiocarbon determinations are becoming available all the -time--already several suggest that the food-producing way of life -had reached the lower Rhine and Holland by 4000 B.C. But not all -prehistorians accept these dates, so I do not show them on my map -(p. 139). - - -THE EARLIEST FARMERS OF ENGLAND - -To describe the later prehistory of all Europe for you would take -another book and a much larger one than this is. Therefore, I have -decided to give you only a few impressions of the later prehistory of -Britain. Of course the British Isles lie at the other end of Europe -from our base-line in western Asia. Also, they received influences -along at least two of the three ways in which the new way of life -moved into Europe. We will look at more of their late prehistory in a -following chapter: here, I shall speak only of the first farmers. - -The assemblage called Windmill Hill, which appears in the south of -England, exhibits three different kinds of structures, evidence of -grain-growing and of stock-breeding, and some distinctive types of -pottery and stone implements. The most remarkable type of structure -is the earthwork enclosures which seem to have served as seasonal -cattle corrals. These enclosures were roughly circular, reached over -a thousand feet in diameter, and sometimes included two or three -concentric sets of banks and ditches. Traces of oblong timber houses -have been found, but not within the enclosures. The second type of -structure is mine-shafts, dug down into the chalk beds where good -flint for the making of axes or hoes could be found. The third type -of structure is long simple mounds or unchambered barrows, in one -end of which burials were made. It has been commonly believed that the -Windmill Hill assemblage belonged entirely to the cultural tradition -which moved up through France to the Channel. Professor Piggott is now -convinced, however, that important elements of Windmill Hill stem from -northern Germany and Denmark--products of the first way into Europe -from the east. - -The archeological traces of a second early culture are to be found -in the west of England, western and northern Scotland, and most of -Ireland. The bearers of this culture had come up the Atlantic coast -by sea from southern France and Spain. The evidence they have left us -consists mainly of tombs and the contents of tombs, with only very -rare settlement sites. The tombs were of some size and received the -bodies of many people. The tombs themselves were built of stone, heaped -over with earth; the stones enclosed a passage to a central chamber -(passage graves), or to a simple long gallery, along the sides of -which the bodies were laid (gallery graves). The general type of -construction is called megalithic (= great stone), and the whole -earth-mounded structure is often called a _barrow_. Since many have -proper chambers, in one sense or another, we used the term unchambered -barrow above to distinguish those of the Windmill Hill type from these -megalithic structures. There is some evidence for sacrifice, libations, -and ceremonial fires, and it is clear that some form of community -ritual was focused on the megalithic tombs. - -The cultures of the people who produced the Windmill Hill assemblage -and of those who made the megalithic tombs flourished, at least in -part, at the same time. Although the distributions of the two different -types of archeological traces are in quite different parts of the -country, there is Windmill Hill pottery in some of the megalithic -tombs. But the tombs also contain pottery which seems to have arrived -with the tomb builders themselves. - -The third early British group of antiquities of this general time -(following 2500 B.C.) comes from sites in southern and eastern England. -It is not so certain that the people who made this assemblage, called -Peterborough, were actually farmers. While they may on occasion have -practiced a simple agriculture, many items of their assemblage link -them closely with that of the Forest folk of earlier times in -England and in the Baltic countries. Their pottery is decorated with -impressions of cords and is quite different from that of Windmill Hill -and the megalithic builders. In addition, the distribution of their -finds extends into eastern Britain, where the other cultures have left -no trace. The Peterborough people had villages with semi-subterranean -huts, and the bones of oxen, pigs, and sheep have been found in a few -of these. On the whole, however, hunting and fishing seem to have been -their vital occupations. They also established trade routes especially -to acquire the raw material for stone axes. - -A probably slightly later culture, whose traces are best known from -Skara Brae on Orkney, also had its roots in those cultures of the -Baltic area which fused out of the meeting of the Forest folk and -the peoples who took the eastern way into Europe. Skara Brae is very -well preserved, having been built of thin stone slabs about which -dune-sand drifted after the village died. The individual houses, the -bedsteads, the shelves, the chests for clothes and oddments--all built -of thin stone-slabs--may still be seen in place. But the Skara Brae -people lived entirely by sheep- and cattle-breeding, and by catching -shellfish. Neither grain nor the instruments of agriculture appeared at -Skara Brae. - - -THE EUROPEAN ACHIEVEMENT - -The above is only a very brief description of what went on in Britain -with the arrival of the first farmers. There are many interesting -details which I have omitted in order to shorten the story. - -I believe some of the difficulty we have in understanding the -establishment of the first farming communities in Europe is with -the word colonization. We have a natural tendency to think of -colonization as it has happened within the last few centuries. In the -case of the colonization of the Americas, for example, the colonists -came relatively quickly, and in increasingly vast numbers. They had -vastly superior technical, political, and war-making skills, compared -with those of the Indians. There was not much mixing with the Indians. -The case in Europe five or six thousand years ago must have been very -different. I wonder if it is even proper to call people colonists -who move some miles to a new region, settle down and farm it for some -years, then move on again, generation after generation? The ideas and -the things which these new people carried were only _potentially_ -superior. The ideas and things and the people had to prove themselves -in their adaptation to each new environment. Once this was done another -link to the chain would be added, and then the forest-dwellers and -other indigenous folk of Europe along the way might accept the new -ideas and things. It is quite reasonable to expect that there must have -been much mixture of the migrants and the indigenes along the way; the -Peterborough and Skara Brae assemblages we mentioned above would seem -to be clear traces of such fused cultures. Sometimes, especially if the -migrants were moving by boat, long distances may have been covered in -a short time. Remember, however, we seem to have about three thousand -years between the early Syro-Cilician villages and Windmill Hill. - -Let me repeat Professor Childe again. The peoples of the West were -not slavish imitators: they adapted the gifts from the East ... into -a new and organic whole capable of developing on its own original -lines. Childe is of course completely conscious of the fact that his -peoples of the West were in part the descendants of migrants who came -originally from the East, bringing their gifts with them. This -was the late prehistoric achievement of Europe--to take new ideas and -things and some migrant peoples and, by mixing them with the old in its -own environments, to forge a new and unique series of cultures. - -What we know of the ways of men suggests to us that when the details -of the later prehistory of further Asia and Africa are learned, their -stories will be just as exciting. - - - - -THE Conquest of Civilization - -[Illustration] - - -Now we must return to the Near East again. We are coming to the point -where history is about to begin. I am going to stick pretty close -to Iraq and Egypt in this chapter. These countries will perhaps be -the most interesting to most of us, for the foundations of western -civilization were laid in the river lands of the Tigris and Euphrates -and of the Nile. I shall probably stick closest of all to Iraq, because -things first happened there and also because I know it best. - -There is another interesting thing, too. We have seen that the first -experiment in village-farming took place in the Near East. So did -the first experiment in civilization. Both experiments took. The -traditions we live by today are based, ultimately, on those ancient -beginnings in food-production and civilization in the Near East. - - -WHAT CIVILIZATION MEANS - -I shall not try to define civilization for you; rather, I shall -tell you what the word brings to my mind. To me civilization means -urbanization: the fact that there are cities. It means a formal -political set-up--that there are kings or governing bodies that the -people have set up. It means formal laws--rules of conduct--which the -government (if not the people) believes are necessary. It probably -means that there are formalized projects--roads, harbors, irrigation -canals, and the like--and also some sort of army or police force -to protect them. It means quite new and different art forms. It -also usually means there is writing. (The people of the Andes--the -Incas--had everything which goes to make up a civilization but formal -writing. I can see no reason to say they were not civilized.) Finally, -as the late Professor Redfield reminded us, civilization seems to bring -with it the dawn of a new kind of moral order. - -In different civilizations, there may be important differences in the -way such things as the above are managed. In early civilizations, it is -usual to find religion very closely tied in with government, law, and -so forth. The king may also be a high priest, or he may even be thought -of as a god. The laws are usually thought to have been given to the -people by the gods. The temples are protected just as carefully as the -other projects. - - -CIVILIZATION IMPOSSIBLE WITHOUT FOOD-PRODUCTION - -Civilizations have to be made up of many people. Some of the people -live in the country; some live in very large towns or cities. Classes -of society have begun. There are officials and government people; there -are priests or religious officials; there are merchants and traders; -there are craftsmen, metal-workers, potters, builders, and so on; there -are also farmers, and these are the people who produce the food for the -whole population. It must be obvious that civilization cannot exist -without food-production and that food-production must also be at a -pretty efficient level of village-farming before civilization can even -begin. - -But people can be food-producing without being civilized. In many -parts of the world this is still the case. When the white men first -came to America, the Indians in most parts of this hemisphere were -food-producers. They grew corn, potatoes, tomatoes, squash, and many -other things the white men had never eaten before. But only the Aztecs -of Mexico, the Mayas of Yucatan and Guatemala, and the Incas of the -Andes were civilized. - - -WHY DIDNT CIVILIZATION COME TO ALL FOOD-PRODUCERS? - -Once you have food-production, even at the well-advanced level of -the village-farming community, what else has to happen before you -get civilization? Many men have asked this question and have failed -to give a full and satisfactory answer. There is probably no _one_ -answer. I shall give you my own idea about how civilization _may_ have -come about in the Near East alone. Remember, it is only a guess--a -putting together of hunches from incomplete evidence. It is _not_ meant -to explain how civilization began in any of the other areas--China, -southeast Asia, the Americas--where other early experiments in -civilization went on. The details in those areas are quite different. -Whether certain general principles hold, for the appearance of any -early civilization, is still an open and very interesting question. - - -WHERE CIVILIZATION FIRST APPEARED IN THE NEAR EAST - -You remember that our earliest village-farming communities lay along -the hilly flanks of a great crescent. (See map on p. 125.) -Professor Breasteds fertile crescent emphasized the rich river -valleys of the Nile and the Tigris-Euphrates Rivers. Our hilly-flanks -area of the crescent zone arches up from Egypt through Palestine and -Syria, along southern Turkey into northern Iraq, and down along the -southwestern fringe of Iran. The earliest food-producing villages we -know already existed in this area by about 6750 B.C. ( 200 years). - -Now notice that this hilly-flanks zone does not include southern -Mesopotamia, the alluvial land of the lower Tigris and Euphrates in -Iraq, or the Nile Valley proper. The earliest known villages of classic -Mesopotamia and Egypt seem to appear fifteen hundred or more years -after those of the hilly-flanks zone. For example, the early Fayum -village which lies near a lake west of the Nile Valley proper (see p. -135) has a radiocarbon date of 4275 B.C. 320 years. It was in the -river lands, however, that the immediate beginnings of civilization -were made. - -We know that by about 3200 B.C. the Early Dynastic period had begun -in southern Mesopotamia. The beginnings of writing go back several -hundred years earlier, but we can safely say that civilization had -begun in Mesopotamia by 3200 B.C. In Egypt, the beginning of the First -Dynasty is slightly later, at about 3100 B.C., and writing probably -did not appear much earlier. There is no question but that history and -civilization were well under way in both Mesopotamia and Egypt by 3000 -B.C.--about five thousand years ago. - - -THE HILLY-FLANKS ZONE VERSUS THE RIVER LANDS - -Why did these two civilizations spring up in these two river -lands which apparently were not even part of the area where the -village-farming community began? Why didnt we have the first -civilizations in Palestine, Syria, north Iraq, or Iran, where were -sure food-production had had a long time to develop? I think the -probable answer gives a clue to the ways in which civilization began in -Egypt and Mesopotamia. - -The land in the hilly flanks is of a sort which people can farm without -too much trouble. There is a fairly fertile coastal strip in Palestine -and Syria. There are pleasant mountain slopes, streams running out to -the sea, and rain, at least in the winter months. The rain belt and the -foothills of the Turkish mountains also extend to northern Iraq and on -to the Iranian plateau. The Iranian plateau has its mountain valleys, -streams, and some rain. These hilly flanks of the crescent, through -most of its arc, are almost made-to-order for beginning farmers. The -grassy slopes of the higher hills would be pasture for their herds -and flocks. As soon as the earliest experiments with agriculture and -domestic animals had been successful, a pleasant living could be -made--and without too much trouble. - -I should add here again, that our evidence points increasingly to a -climate for those times which is very little different from that for -the area today. Now look at Egypt and southern Mesopotamia. Both are -lands without rain, for all intents and purposes. Both are lands with -rivers that have laid down very fertile soil--soil perhaps superior to -that in the hilly flanks. But in both lands, the rivers are of no great -aid without some control. - -The Nile floods its banks once a year, in late September or early -October. It not only soaks the narrow fertile strip of land on either -side; it lays down a fresh layer of new soil each year. Beyond the -fertile strip on either side rise great cliffs, and behind them is the -desert. In its natural, uncontrolled state, the yearly flood of the -Nile must have caused short-lived swamps that were full of crocodiles. -After a short time, the flood level would have dropped, the water and -the crocodiles would have run back into the river, and the swamp plants -would have become parched and dry. - -The Tigris and the Euphrates of Mesopotamia are less likely to flood -regularly than the Nile. The Tigris has a shorter and straighter course -than the Euphrates; it is also the more violent river. Its banks are -high, and when the snows melt and flow into all of its tributary rivers -it is swift and dangerous. The Euphrates has a much longer and more -curving course and few important tributaries. Its banks are lower and -it is less likely to flood dangerously. The land on either side and -between the two rivers is very fertile, south of the modern city of -Baghdad. Unlike the Nile Valley, neither the Tigris nor the Euphrates -is flanked by cliffs. The land on either side of the rivers stretches -out for miles and is not much rougher than a poor tennis court. - - -THE RIVERS MUST BE CONTROLLED - -The real trick in both Egypt and Mesopotamia is to make the rivers work -for you. In Egypt, this is a matter of building dikes and reservoirs -that will catch and hold the Nile flood. In this way, the water is held -and allowed to run off over the fields as it is needed. In Mesopotamia, -it is a matter of taking advantage of natural river channels and branch -channels, and of leading ditches from these onto the fields. - -Obviously, we can no longer find the first dikes or reservoirs of -the Nile Valley, or the first canals or ditches of Mesopotamia. The -same land has been lived on far too long for any traces of the first -attempts to be left; or, especially in Egypt, it has been covered by -the yearly deposits of silt, dropped by the river floods. But were -pretty sure the first food-producers of Egypt and southern Mesopotamia -must have made such dikes, canals, and ditches. In the first place, -there cant have been enough rain for them to grow things otherwise. -In the second place, the patterns for such projects seem to have been -pretty well set by historic times. - - -CONTROL OF THE RIVERS THE BUSINESS OF EVERYONE - -Here, then, is a _part_ of the reason why civilization grew in Egypt -and Mesopotamia first--not in Palestine, Syria, or Iran. In the latter -areas, people could manage to produce their food as individuals. It -wasnt too hard; there were rain and some streams, and good pasturage -for the animals even if a crop or two went wrong. In Egypt and -Mesopotamia, people had to put in a much greater amount of work, and -this work couldnt be individual work. Whole villages or groups of -people had to turn out to fix dikes or dig ditches. The dikes had to be -repaired and the ditches carefully cleared of silt each year, or they -would become useless. - -There also had to be hard and fast rules. The person who lived nearest -the ditch or the reservoir must not be allowed to take all the water -and leave none for his neighbors. It was not only a business of -learning to control the rivers and of making their waters do the -farmers work. It also meant controlling men. But once these men had -managed both kinds of controls, what a wonderful yield they had! The -soil was already fertile, and the silt which came in the floods and -ditches kept adding fertile soil. - - -THE GERM OF CIVILIZATION IN EGYPT AND MESOPOTAMIA - -This learning to work together for the common good was the real germ of -the Egyptian and the Mesopotamian civilizations. The bare elements of -civilization were already there: the need for a governing hand and for -laws to see that the communities work was done and that the water was -justly shared. You may object that there is a sort of chicken and egg -paradox in this idea. How could the people set up the rules until they -had managed to get a way to live, and how could they manage to get a -way to live until they had set up the rules? I think that small groups -must have moved down along the mud-flats of the river banks quite -early, making use of naturally favorable spots, and that the rules grew -out of such cases. It would have been like the hand-in-hand growth of -automobiles and paved highways in the United States. - -Once the rules and the know-how did get going, there must have been a -constant interplay of the two. Thus, the more the crops yielded, the -richer and better-fed the people would have been, and the more the -population would have grown. As the population grew, more land would -have needed to be flooded or irrigated, and more complex systems of -dikes, reservoirs, canals, and ditches would have been built. The more -complex the system, the more necessity for work on new projects and for -the control of their use.... And so on.... - -What I have just put down for you is a guess at the manner of growth of -some of the formalized systems that go to make up a civilized society. -My explanation has been pointed particularly at Egypt and Mesopotamia. -I have already told you that the irrigation and water-control part of -it does not apply to the development of the Aztecs or the Mayas, or -perhaps anybody else. But I think that a fair part of the story of -Egypt and Mesopotamia must be as Ive just told you. - -I am particularly anxious that you do _not_ understand me to mean that -irrigation _caused_ civilization. I am sure it was not that simple at -all. For, in fact, a complex and highly engineered irrigation system -proper did not come until later times. Lets say rather that the simple -beginnings of irrigation allowed and in fact encouraged a great number -of things in the technological, political, social, and moral realms of -culture. We do not yet understand what all these things were or how -they worked. But without these other aspects of culture, I do not -think that urbanization and civilization itself could have come into -being. - - -THE ARCHEOLOGICAL SEQUENCE TO CIVILIZATION IN IRAQ - -We last spoke of the archeological materials of Iraq on page 130, -where I described the village-farming community of Hassunan type. The -Hassunan type villages appear in the hilly-flanks zone and in the -rolling land adjacent to the Tigris in northern Iraq. It is probable -that even before the Hassuna pattern of culture lived its course, a -new assemblage had been established in northern Iraq and Syria. This -assemblage is called Halaf, after a site high on a tributary of the -Euphrates, on the Syro-Turkish border. - -[Illustration: SKETCH OF SELECTED ITEMS OF HALAFIAN ASSEMBLAGE - - BEADS AND PENDANTS - POTTERY MOTIFS - POTTERY] - -The Halafian assemblage is incompletely known. The culture it -represents included a remarkably handsome painted pottery. -Archeologists have tended to be so fascinated with this pottery that -they have bothered little with the rest of the Halafian assemblage. We -do know that strange stone-founded houses, with plans like those of the -popular notion of an Eskimo igloo, were built. Like the pottery of the -Samarran style, which appears as part of the Hassunan assemblage (see -p. 131), the Halafian painted pottery implies great concentration and -excellence of draftsmanship on the part of the people who painted it. - -We must mention two very interesting sites adjacent to the mud-flats of -the rivers, half way down from northern Iraq to the classic alluvial -Mesopotamian area. One is Baghouz on the Euphrates; the other is -Samarra on the Tigris (see map, p. 125). Both these sites yield the -handsome painted pottery of the style called Samarran: in fact it -is Samarra which gives its name to the pottery. Neither Baghouz nor -Samarra have completely Hassunan types of assemblages, and at Samarra -there are a few pots of proper Halafian style. I suppose that Samarra -and Baghouz give us glimpses of those early farmers who had begun to -finger their way down the mud-flats of the river banks toward the -fertile but yet untilled southland. - - -CLASSIC SOUTHERN MESOPOTAMIA FIRST OCCUPIED - -Our next step is into the southland proper. Here, deep in the core of -the mound which later became the holy Sumerian city of Eridu, Iraqi -archeologists uncovered a handsome painted pottery. Pottery of the same -type had been noticed earlier by German archeologists on the surface -of a small mound, awash in the spring floods, near the remains of the -Biblical city of Erich (Sumerian = Uruk; Arabic = Warka). This Eridu -pottery, which is about all we have of the assemblage of the people who -once produced it, may be seen as a blend of the Samarran and Halafian -painted pottery styles. This may over-simplify the case, but as yet we -do not have much evidence to go on. The idea does at least fit with my -interpretation of the meaning of Baghouz and Samarra as way-points on -the mud-flats of the rivers half way down from the north. - -My colleague, Robert Adams, believes that there were certainly -riverine-adapted food-collectors living in lower Mesopotamia. The -presence of such would explain why the Eridu assemblage is not simply -the sum of the Halafian and Samarran assemblages. But the domesticated -plants and animals and the basic ways of food-production must have -come from the hilly-flanks country in the north. - -Above the basal Eridu levels, and at a number of other sites in the -south, comes a full-fledged assemblage called Ubaid. Incidentally, -there is an aspect of the Ubaidian assemblage in the north as well. It -seems to move into place before the Halaf manifestation is finished, -and to blend with it. The Ubaidian assemblage in the south is by far -the more spectacular. The development of the temple has been traced -at Eridu from a simple little structure to a monumental building some -62 feet long, with a pilaster-decorated faade and an altar in its -central chamber. There is painted Ubaidian pottery, but the style is -hurried and somewhat careless and gives the _impression_ of having been -a cheap mass-production means of decoration when compared with the -carefully drafted styles of Samarra and Halaf. The Ubaidian people made -other items of baked clay: sickles and axes of very hard-baked clay -are found. The northern Ubaidian sites have yielded tools of copper, -but metal tools of unquestionable Ubaidian find-spots are not yet -available from the south. Clay figurines of human beings with monstrous -turtle-like faces are another item in the southern Ubaidian assemblage. - -[Illustration: SKETCH OF SELECTED ITEMS OF UBAIDIAN ASSEMBLAGE] - -There is a large Ubaid cemetery at Eridu, much of it still awaiting -excavation. The few skeletons so far tentatively studied reveal a -completely modern type of Mediterraneanoid; the individuals whom the -skeletons represent would undoubtedly blend perfectly into the modern -population of southern Iraq. What the Ubaidian assemblage says to us is -that these people had already adapted themselves and their culture to -the peculiar riverine environment of classic southern Mesopotamia. For -example, hard-baked clay axes will chop bundles of reeds very well, or -help a mason dress his unbaked mud bricks, and there were only a few -soft and pithy species of trees available. The Ubaidian levels of Eridu -yield quantities of date pits; that excellent and characteristically -Iraqi fruit was already in use. The excavators also found the clay -model of a ship, with the stepping-point for a mast, so that Sinbad the -Sailor must have had his antecedents as early as the time of Ubaid. -The bones of fish, which must have flourished in the larger canals as -well as in the rivers, are common in the Ubaidian levels and thereafter. - - -THE UBAIDIAN ACHIEVEMENT - -On present evidence, my tendency is to see the Ubaidian assemblage -in southern Iraq as the trace of a new era. I wish there were more -evidence, but what we have suggests this to me. The culture of southern -Ubaid soon became a culture of towns--of centrally located towns with -some rural villages about them. The town had a temple and there must -have been priests. These priests probably had political and economic -functions as well as religious ones, if the somewhat later history of -Mesopotamia may suggest a pattern for us. Presently the temple and its -priesthood were possibly the focus of the market; the temple received -its due, and may already have had its own lands and herds and flocks. -The people of the town, undoubtedly at least in consultation with the -temple administration, planned and maintained the simple irrigation -ditches. As the system flourished, the community of rural farmers would -have produced more than sufficient food. The tendency for specialized -crafts to develop--tentative at best at the cultural level of the -earlier village-farming community era--would now have been achieved, -and probably many other specialists in temple administration, water -control, architecture, and trade would also have appeared, as the -surplus food-supply was assured. - -Southern Mesopotamia is not a land rich in natural resources other -than its fertile soil. Stone, good wood for construction, metal, and -innumerable other things would have had to be imported. Grain and -dates--although both are bulky and difficult to transport--and wool and -woven stuffs must have been the mediums of exchange. Over what area did -the trading net-work of Ubaid extend? We start with the idea that the -Ubaidian assemblage is most richly developed in the south. We assume, I -think, correctly, that it represents a cultural flowering of the south. -On the basis of the pottery of the still elusive Eridu immigrants -who had first followed the rivers into alluvial Mesopotamia, we get -the notion that the characteristic painted pottery style of Ubaid -was developed in the southland. If this reconstruction is correct -then we may watch with interest where the Ubaid pottery-painting -tradition spread. We have already mentioned that there is a substantial -assemblage of (and from the southern point of view, _fairly_ pure) -Ubaidian material in northern Iraq. The pottery appears all along the -Iranian flanks, even well east of the head of the Persian Gulf, and -ends in a later and spectacular flourish in an extremely handsome -painted style called the Susa style. Ubaidian pottery has been noted -up the valleys of both of the great rivers, well north of the Iraqi -and Syrian borders on the southern flanks of the Anatolian plateau. -It reaches the Mediterranean Sea and the valley of the Orontes in -Syria, and it may be faintly reflected in the painted style of a -site called Ghassul, on the east bank of the Jordan in the Dead Sea -Valley. Over this vast area--certainly in all of the great basin of -the Tigris-Euphrates drainage system and its natural extensions--I -believe we may lay our fingers on the traces of a peculiar way of -decorating pottery, which we call Ubaidian. This cursive and even -slap-dash decoration, it appears to me, was part of a new cultural -tradition which arose from the adjustments which immigrant northern -farmers first made to the new and challenging environment of southern -Mesopotamia. But exciting as the idea of the spread of influences of -the Ubaid tradition in space may be, I believe you will agree that the -consequences of the growth of that tradition in southern Mesopotamia -itself, as time passed, are even more important. - - -THE WARKA PHASE IN THE SOUTH - -So far, there are only two radiocarbon determinations for the Ubaidian -assemblage, one from Tepe Gawra in the north and one from Warka in the -south. My hunch would be to use the dates 4500 to 3750 B.C., with a -plus or more probably a minus factor of about two hundred years for -each, as the time duration of the Ubaidian assemblage in southern -Mesopotamia. - -Next, much to our annoyance, we have what is almost a temporary -black-out. According to the system of terminology I favor, our next -assemblage after that of Ubaid is called the _Warka_ phase, from -the Arabic name for the site of Uruk or Erich. We know it only from -six or seven levels in a narrow test-pit at Warka, and from an even -smaller hole at another site. This assemblage, so far, is known only -by its pottery, some of which still bears Ubaidian style painting. The -characteristic Warkan pottery is unpainted, with smoothed red or gray -surfaces and peculiar shapes. Unquestionably, there must be a great -deal more to say about the Warkan assemblage, but someone will first -have to excavate it! - - -THE DAWN OF CIVILIZATION - -After our exasperation with the almost unknown Warka interlude, -following the brilliant false dawn of Ubaid, we move next to an -assemblage which yields traces of a preponderance of those elements -which we noted (p. 144) as meaning civilization. This assemblage -is that called _Proto-Literate_; it already contains writing. On -the somewhat shaky principle that writing, however early, means -history--and no longer prehistory--the assemblage is named for the -historical implications of its content, and no longer after the name of -the site where it was first found. Since some of the older books used -site-names for this assemblage, I will tell you that the Proto-Literate -includes the latter half of what used to be called the Uruk period -_plus_ all of what used to be called the Jemdet Nasr period. It shows -a consistent development from beginning to end. - -I shall, in fact, leave much of the description and the historic -implications of the Proto-Literate assemblage to the conventional -historians. Professor T. J. Jacobsen, reaching backward from the -legends he finds in the cuneiform writings of slightly later times, can -in fact tell you a more complete story of Proto-Literate culture than -I can. It should be enough here if I sum up briefly what the excavated -archeological evidence shows. - -We have yet to dig a Proto-Literate site in its entirety, but the -indications are that the sites cover areas the size of small cities. -In architecture, we know of large and monumental temple structures, -which were built on elaborate high terraces. The plans and decoration -of these temples follow the pattern set in the Ubaid phase: the chief -difference is one of size. The German excavators at the site of Warka -reckoned that the construction of only one of the Proto-Literate temple -complexes there must have taken 1,500 men, each working a ten-hour day, -five years to build. - - -ART AND WRITING - -If the architecture, even in its monumental forms, can be seen to -stem from Ubaidian developments, this is not so with our other -evidence of Proto-Literate artistic expression. In relief and applied -sculpture, in sculpture in the round, and on the engraved cylinder -seals--all of which now make their appearance--several completely -new artistic principles are apparent. These include the composition -of subject-matter in groups, commemorative scenes, and especially -the ability and apparent desire to render the human form and face. -Excellent as the animals of the Franco-Cantabrian art may have been -(see p. 85), and however handsome were the carefully drafted -geometric designs and conventionalized figures on the pottery of the -early farmers, there seems to have been, up to this time, a mental -block about the drawing of the human figure and especially the human -face. We do not yet know what caused this self-consciousness about -picturing themselves which seems characteristic of men before the -appearance of civilization. We do know that with civilization, the -mental block seems to have been removed. - -Clay tablets bearing pictographic signs are the Proto-Literate -forerunners of cuneiform writing. The earliest examples are not well -understood but they seem to be devices for making accounts and -for remembering accounts. Different from the later case in Egypt, -where writing appears fully formed in the earliest examples, the -development from simple pictographic signs to proper cuneiform writing -may be traced, step by step, in Mesopotamia. It is most probable -that the development of writing was connected with the temple and -the need for keeping account of the temples possessions. Professor -Jacobsen sees writing as a means for overcoming space, time, and the -increasing complications of human affairs: Literacy, which began -with ... civilization, enhanced mightily those very tendencies in its -development which characterize it as a civilization and mark it off as -such from other types of culture. - -[Illustration: RELIEF ON A PROTO-LITERATE STONE VASE, WARKA - -Unrolled drawing, with restoration suggested by figures from -contemporary cylinder seals] - -While the new principles in art and the idea of writing are not -foreshadowed in the Ubaid phase, or in what little we know of the -Warkan, I do not think we need to look outside southern Mesopotamia -for their beginnings. We do know something of the adjacent areas, -too, and these beginnings are not there. I think we must accept them -as completely new discoveries, made by the people who were developing -the whole new culture pattern of classic southern Mesopotamia. Full -description of the art, architecture, and writing of the Proto-Literate -phase would call for many details. Men like Professor Jacobsen and Dr. -Adams can give you these details much better than I can. Nor shall I do -more than tell you that the common pottery of the Proto-Literate phase -was so well standardized that it looks factory made. There was also -some handsome painted pottery, and there were stone bowls with inlaid -decoration. Well-made tools in metal had by now become fairly common, -and the metallurgist was experimenting with the casting process. Signs -for plows have been identified in the early pictographs, and a wheeled -chariot is shown on a cylinder seal engraving. But if I were forced to -a guess in the matter, I would say that the development of plows and -draft-animals probably began in the Ubaid period and was another of the -great innovations of that time. - -The Proto-Literate assemblage clearly suggests a highly developed and -sophisticated culture. While perhaps not yet fully urban, it is on -the threshold of urbanization. There seems to have been a very dense -settlement of Proto-Literate sites in classic southern Mesopotamia, -many of them newly founded on virgin soil where no earlier settlements -had been. When we think for a moment of what all this implies, of the -growth of an irrigation system which must have existed to allow the -flourish of this culture, and of the social and political organization -necessary to maintain the irrigation system, I think we will agree that -at last we are dealing with civilization proper. - - -FROM PREHISTORY TO HISTORY - -Now it is time for the conventional ancient historians to take over -the story from me. Remember this when you read what they write. Their -real base-line is with cultures ruled over by later kings and emperors, -whose writings describe military campaigns and the administration of -laws and fully organized trading ventures. To these historians, the -Proto-Literate phase is still a simple beginning for what is to follow. -If they mention the Ubaid assemblage at all--the one I was so lyrical -about--it will be as some dim and fumbling step on the path to the -civilized way of life. - -I suppose you could say that the difference in the approach is that as -a prehistorian I have been looking forward or upward in time, while the -historians look backward to glimpse what Ive been describing here. My -base-line was half a million years ago with a being who had little more -than the capacity to make tools and fire to distinguish him from the -animals about him. Thus my point of view and that of the conventional -historian are bound to be different. You will need both if you want to -understand all of the story of men, as they lived through time to the -present. - - - - -End of PREHISTORY - -[Illustration] - - -Youll doubtless easily recall your general course in ancient history: -how the Sumerian dynasties of Mesopotamia were supplanted by those of -Babylonia, how the Hittite kingdom appeared in Anatolian Turkey, and -about the three great phases of Egyptian history. The literate kingdom -of Crete arose, and by 1500 B.C. there were splendid fortified Mycenean -towns on the mainland of Greece. This was the time--about the whole -eastern end of the Mediterranean--of what Professor Breasted called the -first great internationalism, with flourishing trade, international -treaties, and royal marriages between Egyptians, Babylonians, and -Hittites. By 1200 B.C., the whole thing had fragmented: the peoples of -the sea were restless in their isles, and the great ancient centers in -Egypt, Mesopotamia, and Anatolia were eclipsed. Numerous smaller states -arose--Assyria, Phoenicia, Israel--and the Trojan war was fought. -Finally Assyria became the paramount power of all the Near East, -presently to be replaced by Persia. - -A new culture, partaking of older west Asiatic and Egyptian elements, -but casting them with its own tradition into a new mould, arose in -mainland Greece. - -I once shocked my Classical colleagues to the core by referring to -Greece as a second degree derived civilization, but there is much -truth in this. The principles of bronze- and then of iron-working, of -the alphabet, and of many other elements in Greek culture were borrowed -from western Asia. Our debt to the Greeks is too well known for me even -to mention it, beyond recalling to you that it is to Greece we owe the -beginnings of rational or empirical science and thought in general. But -Greece fell in its turn to Rome, and in 55 B.C. Caesar invaded Britain. - -I last spoke of Britain on page 142; I had chosen it as my single -example for telling you something of how the earliest farming -communities were established in Europe. Now I will continue with -Britains later prehistory, so you may sense something of the end of -prehistory itself. Remember that Britain is simply a single example -we select; the same thing could be done for all the other countries -of Europe, and will be possible also, some day, for further Asia and -Africa. Remember, too, that prehistory in most of Europe runs on for -three thousand or more years _after_ conventional ancient history -begins in the Near East. Britain is a good example to use in showing -how prehistory ended in Europe. As we said earlier, it lies at the -opposite end of Europe from the area of highest cultural achievement in -those times, and should you care to read more of the story in detail, -you may do so in the English language. - - -METAL USERS REACH ENGLAND - -We left the story of Britain with the peoples who made three different -assemblages--the Windmill Hill, the megalith-builders, and the -Peterborough--making adjustments to their environments, to the original -inhabitants of the island, and to each other. They had first arrived -about 2500 B.C., and were simple pastoralists and hoe cultivators who -lived in little village communities. Some of them planted little if any -grain. By 2000 B.C., they were well settled in. Then, somewhere in the -range from about 1900 to 1800 B.C., the traces of the invasion of a new -series of peoples began to appear. - -The first newcomers are called the Beaker folk, after the name of a -peculiar form of pottery they made. The beaker type of pottery seems -oldest in Spain, where it occurs with great collective tombs of -megalithic construction and with copper tools. But the Beaker folk who -reached England seem already to have moved first from Spain(?) to the -Rhineland and Holland. While in the Rhineland, and before leaving for -England, the Beaker folk seem to have mixed with the local population -and also with incomers from northeastern Europe whose culture included -elements brought originally from the Near East by the eastern way -through the steppes. This last group has also been named for a peculiar -article in its assemblage; the group is called the Battle-axe folk. A -few Battle-axe folk elements, including, in fact, stone battle-axes, -reached England with the earliest Beaker folk,[6] coming from the -Rhineland. - - [6] The British authors use the term Beaker folk to mean both - archeological assemblage and human physical type. They speak - of a ... tall, heavy-boned, rugged, and round-headed strain - which they take to have developed, apparently in the Rhineland, - by a mixture of the original (Spanish?) beaker-makers and - the northeast European battle-axe makers. However, since the - science of physical anthropology is very much in flux at the - moment, and since I am not able to assess the evidence for these - physical types, I _do not_ use the term folk in this book with - its usual meaning of standardized physical type. When I use - folk here, I mean simply _the makers of a given archeological - assemblage_. The difficulty only comes when assemblages are - named for some item in them; it is too clumsy to make an - adjective of the item and refer to a beakerian assemblage. - -The Beaker folk settled earliest in the agriculturally fertile south -and east. There seem to have been several phases of Beaker folk -invasions, and it is not clear whether these all came strictly from the -Rhineland or Holland. We do know that their copper daggers and awls -and armlets are more of Irish or Atlantic European than of Rhineland -origin. A few simple habitation sites and many burials of the Beaker -folk are known. They buried their dead singly, sometimes in conspicuous -individual barrows with the dead warrior in his full trappings. The -spectacular element in the assemblage of the Beaker folk is a group -of large circular monuments with ditches and with uprights of wood or -stone. These henges became truly monumental several hundred years -later; while they were occasionally dedicated with a burial, they were -not primarily tombs. The effect of the invasion of the Beaker folk -seems to cut across the whole fabric of life in Britain. - -[Illustration: BEAKER] - -There was, however, a second major element in British life at this -time. It shows itself in the less well understood traces of a group -again called after one of the items in their catalogue, the Food-vessel -folk. There are many burials in these food-vessel pots in northern -England, Scotland, and Ireland, and the pottery itself seems to -link back to that of the Peterborough assemblage. Like the earlier -Peterborough people in the highland zone before them, the makers of -the food-vessels seem to have been heavily involved in trade. It is -quite proper to wonder whether the food-vessel pottery itself was made -by local women who were married to traders who were middlemen in the -transmission of Irish metal objects to north Germany and Scandinavia. -The belt of high, relatively woodless country, from southwest to -northeast, was already established as a natural route for inland trade. - - -MORE INVASIONS - -About 1500 B.C., the situation became further complicated by the -arrival of new people in the region of southern England anciently -called Wessex. The traces suggest the Brittany coast of France as a -source, and the people seem at first to have been a small but heroic -group of aristocrats. Their heroes are buried with wealth and -ceremony, surrounded by their axes and daggers of bronze, their gold -ornaments, and amber and jet beads. These rich finds show that the -trade-linkage these warriors patronized spread from the Baltic sources -of amber to Mycenean Greece or even Egypt, as evidenced by glazed blue -beads. - -The great visual trace of Wessex achievement is the final form of -the spectacular sanctuary at Stonehenge. A wooden henge or circular -monument was first made several hundred years earlier, but the site -now received its great circles of stone uprights and lintels. The -diameter of the surrounding ditch at Stonehenge is about 350 feet, the -diameter of the inner circle of large stones is about 100 feet, and -the tallest stone of the innermost horseshoe-shaped enclosure is 29 -feet 8 inches high. One circle is made of blue stones which must have -been transported from Pembrokeshire, 145 miles away as the crow flies. -Recently, many carvings representing the profile of a standard type of -bronze axe of the time, and several profiles of bronze daggers--one of -which has been called Mycenean in type--have been found carved in the -stones. We cannot, of course, describe the details of the religious -ceremonies which must have been staged in Stonehenge, but we can -certainly imagine the well-integrated and smoothly working culture -which must have been necessary before such a great monument could have -been built. - - -THIS ENGLAND - -The range from 1900 to about 1400 B.C. includes the time of development -of the archeological features usually called the Early Bronze Age -in Britain. In fact, traces of the Wessex warriors persisted down to -about 1200 B.C. The main regions of the island were populated, and the -adjustments to the highland and lowland zones were distinct and well -marked. The different aspects of the assemblages of the Beaker folk and -the clearly expressed activities of the Food-vessel folk and the Wessex -warriors show that Britain was already taking on her characteristic -trading role, separated from the European continent but conveniently -adjacent to it. The tin of Cornwall--so important in the production -of good bronze--as well as the copper of the west and of Ireland, -taken with the gold of Ireland and the general excellence of Irish -metal work, assured Britain a traders place in the then known world. -Contacts with the eastern Mediterranean may have been by sea, with -Cornish tin as the attraction, or may have been made by the Food-vessel -middlemen on their trips to the Baltic coast. There they would have -encountered traders who traveled the great north-south European road, -by which Baltic amber moved southward to Greece and the Levant, and -ideas and things moved northward again. - -There was, however, the Channel between England and Europe, and this -relative isolation gave some peace and also gave time for a leveling -and further fusion of culture. The separate cultural traditions began -to have more in common. The growing of barley, the herding of sheep and -cattle, and the production of woolen garments were already features -common to all Britains inhabitants save a few in the remote highlands, -the far north, and the distant islands not yet fully touched by -food-production. The personality of Britain was being formed. - - -CREMATION BURIALS BEGIN - -Along with people of certain religious faiths, archeologists are -against cremation (for other people!). Individuals to be cremated seem -in past times to have been dressed in their trappings and put upon a -large pyre: it takes a lot of wood and a very hot fire for a thorough -cremation. When the burning had been completed, the few fragile scraps -of bone and such odd beads of stone or other rare items as had resisted -the great heat seem to have been whisked into a pot and the pot buried. -The archeologist is left with the pot and the unsatisfactory scraps in -it. - -Tentatively, after about 1400 B.C. and almost completely over the whole -island by 1200 B.C., Britain became the scene of cremation burials -in urns. We know very little of the people themselves. None of their -settlements have been identified, although there is evidence that they -grew barley and made enclosures for cattle. The urns used for the -burials seem to have antecedents in the pottery of the Food-vessel -folk, and there are some other links with earlier British traditions. -In Lancashire, a wooden circle seems to have been built about a grave -with cremated burials in urns. Even occasional instances of cremation -may be noticed earlier in Britain, and it is not clear what, if any, -connection the British cremation burials in urns have with the classic -_Urnfields_ which were now beginning in the east Mediterranean and -which we shall mention below. - -The British cremation-burial-in-urns folk survived a long time in the -highland zone. In the general British scheme, they make up what is -called the Middle Bronze Age, but in the highland zone they last -until after 900 B.C. and are considered to be a specialized highland -Late Bronze Age. In the highland zone, these later cremation-burial -folk seem to have continued the older Food-vessel tradition of being -middlemen in the metal market. - -Granting that our knowledge of this phase of British prehistory is -very restricted because the cremations have left so little for the -archeologist, it does not appear that the cremation-burial-urn folk can -be sharply set off from their immediate predecessors. But change on a -grander scale was on the way. - - -REVERBERATIONS FROM CENTRAL EUROPE - -In the centuries immediately following 1000 B.C., we see with fair -clarity two phases of a cultural process which must have been going -on for some time. Certainly several of the invasions we have already -described in this chapter were due to earlier phases of the same -cultural process, but we could not see the details. - -[Illustration: SLASHING SWORD] - -Around 1200 B.C. central Europe was upset by the spread of the -so-called Urnfield folk, who practiced cremation burial in urns and -whom we also know to have been possessors of long, slashing swords and -the horse. I told you above that we have no idea that the Urnfield -folk proper were in any way connected with the people who made -cremation-burial-urn cemeteries a century or so earlier in Britain. It -has been supposed that the Urnfield folk themselves may have shared -ideas with the people who sacked Troy. We know that the Urnfield -pressure from central Europe displaced other people in northern France, -and perhaps in northwestern Germany, and that this reverberated into -Britain about 1000 B.C. - -Soon after 750 B.C., the same thing happened again. This time, the -pressure from central Europe came from the Hallstatt folk who were iron -tool makers: the reverberation brought people from the western Alpine -region across the Channel into Britain. - -At first it is possible to see the separate results of these folk -movements, but the developing cultures soon fused with each other and -with earlier British elements. Presently there were also strains of -other northern and western European pottery and traces of Urnfield -practices themselves which appeared in the finished British product. I -hope you will sense that I am vastly over-simplifying the details. - -The result seems to have been--among other things--a new kind of -agricultural system. The land was marked off by ditched divisions. -Rectangular fields imply the plow rather than hoe cultivation. We seem -to get a picture of estate or tribal boundaries which included village -communities; we find a variety of tools in bronze, and even whetstones -which show that iron has been honed on them (although the scarce iron -has not been found). Let me give you the picture in Professor S. -Piggotts words: The ... Late Bronze Age of southern England was but -the forerunner of the earliest Iron Age in the same region, not only in -the techniques of agriculture, but almost certainly in terms of ethnic -kinship ... we can with some assurance talk of the Celts ... the great -early Celtic expansion of the Continent is recognized to be that of the -Urnfield people. - -Thus, certainly by 500 B.C., there were people in Britain, some of -whose descendants we may recognize today in name or language in remote -parts of Wales, Scotland, and the Hebrides. - - -THE COMING OF IRON - -Iron--once the know-how of reducing it from its ore in a very hot, -closed fire has been achieved--produces a far cheaper and much more -efficient set of tools than does bronze. Iron tools seem first to -have been made in quantity in Hittite Anatolia about 1500 B.C. In -continental Europe, the earliest, so-called Hallstatt, iron-using -cultures appeared in Germany soon after 750 B.C. Somewhat later, -Greek and especially Etruscan exports of _objets dart_--which moved -with a flourishing trans-Alpine wine trade--influenced the Hallstatt -iron-working tradition. Still later new classical motifs, together with -older Hallstatt, oriental, and northern nomad motifs, gave rise to a -new style in metal decoration which characterizes the so-called La Tne -phase. - -A few iron users reached Britain a little before 400 B.C. Not long -after that, a number of allied groups appeared in southern and -southeastern England. They came over the Channel from France and must -have been Celts with dialects related to those already in England. A -second wave of Celts arrived from the Marne district in France about -250 B.C. Finally, in the second quarter of the first century B.C., -there were several groups of newcomers, some of whom were Belgae of -a mixed Teutonic-Celtic confederacy of tribes in northern France and -Belgium. The Belgae preceded the Romans by only a few years. - - -HILL-FORTS AND FARMS - -The earliest iron-users seem to have entrenched themselves temporarily -within hill-top forts, mainly in the south. Gradually, they moved -inland, establishing _individual_ farm sites with extensive systems -of rectangular fields. We recognize these fields by the lynchets or -lines of soil-creep which plowing left on the slopes of hills. New -crops appeared; there were now bread wheat, oats, and rye, as well as -barley. - -At Little Woodbury, near the town of Salisbury, a farmstead has been -rather completely excavated. The rustic buildings were within a -palisade, the round house itself was built of wood, and there were -various outbuildings and pits for the storage of grain. Weaving was -done on the farm, but not blacksmithing, which must have been a -specialized trade. Save for the lack of firearms, the place might -almost be taken for a farmstead on the American frontier in the early -1800s. - -Toward 250 B.C. there seems to have been a hasty attempt to repair the -hill-forts and to build new ones, evidently in response to signs of -restlessness being shown by remote relatives in France. - - -THE SECOND PHASE - -Perhaps the hill-forts were not entirely effective or perhaps a -compromise was reached. In any case, the newcomers from the Marne -district did establish themselves, first in the southeast and then to -the north and west. They brought iron with decoration of the La Tne -type and also the two-wheeled chariot. Like the Wessex warriors of -over a thousand years earlier, they made heroes graves, with their -warriors buried in the war-chariots and dressed in full trappings. - -[Illustration: CELTIC BUCKLE] - -The metal work of these Marnian newcomers is excellent. The peculiar -Celtic art style, based originally on the classic tendril motif, -is colorful and virile, and fits with Greek and Roman descriptions -of Celtic love of color in dress. There is a strong trace of these -newcomers northward in Yorkshire, linked by Ptolemys description to -the Parisii, doubtless part of the Celtic tribe which originally gave -its name to Paris on the Seine. Near Glastonbury, in Somerset, two -villages in swamps have been excavated. They seem to date toward the -middle of the first century B.C., which was a troubled time in Britain. -The circular houses were built on timber platforms surrounded with -palisades. The preservation of antiquities by the water-logged peat of -the swamp has yielded us a long catalogue of the materials of these -villagers. - -In Scotland, which yields its first iron tools at a date of about 100 -B.C., and in northern Ireland even slightly earlier, the effects of the -two phases of newcomers tend especially to blend. Hill-forts, brochs -(stone-built round towers) and a variety of other strange structures -seem to appear as the new ideas develop in the comparative isolation of -northern Britain. - - -THE THIRD PHASE - -For the time of about the middle of the first century B.C., we again -see traces of frantic hill-fort construction. This simple military -architecture now took some new forms. Its multiple ramparts must -reflect the use of slings as missiles, rather than spears. We probably -know the reason. In 56 B.C., Julius Caesar chastised the Veneti of -Brittany for outraging the dignity of Roman ambassadors. The Veneti -were famous slingers, and doubtless the reverberations of escaping -Veneti were felt across the Channel. The military architecture suggests -that some Veneti did escape to Britain. - -Also, through Caesar, we learn the names of newcomers who arrived in -two waves, about 75 B.C. and about 50 B.C. These were the Belgae. Now, -at last, we can even begin to speak of dynasties and individuals. -Some time before 55 B.C., the Catuvellauni, originally from the Marne -district in France, had possessed themselves of a large part of -southeastern England. They evidently sailed up the Thames and built a -town of over a hundred acres in area. Here ruled Cassivellaunus, the -first man in England whose name we know, and whose town Caesar sacked. -The town sprang up elsewhere again, however. - - -THE END OF PREHISTORY - -Prehistory, strictly speaking, is now over in southern Britain. -Claudius effective invasion took place in 43 A.D.; by 83 A.D., a raid -had been made as far north as Aberdeen in Scotland. But by 127 A.D., -Hadrian had completed his wall from the Solway to the Tyne, and the -Romans settled behind it. In Scotland, Romanization can have affected -the countryside very little. Professor Piggott adds that ... it is -when the pressure of Romanization is relaxed by the break-up of the -Dark Ages that we see again the Celtic metal-smiths handling their -material with the same consummate skill as they had before the Roman -Conquest, and with traditional styles that had not even then forgotten -their Marnian and Belgic heritage. - -In fact, many centuries go by, in Britain as well as in the rest of -Europe, before the archeologists task is complete and the historian on -his own is able to describe the ways of men in the past. - - -BRITAIN AS A SAMPLE OF THE GENERAL COURSE OF PREHISTORY IN EUROPE - -In giving this very brief outline of the later prehistory of Britain, -you will have noticed how often I had to refer to the European -continent itself. Britain, beyond the English Channel for all of her -later prehistory, had a much simpler course of events than did most of -the rest of Europe in later prehistoric times. This holds, in spite -of all the invasions and reverberations from the continent. Most -of Europe was the scene of an even more complicated ebb and flow of -cultural change, save in some of its more remote mountain valleys and -peninsulas. - -The whole course of later prehistory in Europe is, in fact, so very -complicated that there is no single good book to cover it all; -certainly there is none in English. There are some good regional -accounts and some good general accounts of part of the range from about -3000 B.C. to A.D. 1. I suspect that the difficulty of making a good -book that covers all of its later prehistory is another aspect of what -makes Europe so very complicated a continent today. The prehistoric -foundations for Europes very complicated set of civilizations, -cultures, and sub-cultures--which begin to appear as history -proceeds--were in themselves very complicated. - -Hence, I selected the case of Britain as a single example of how -prehistory ends in Europe. It could have been more complicated than we -found it to be. Even in the subject matter on Britain in the chapter -before the last, we did not see direct traces of the effect on Britain -of the very important developments which took place in the Danubian -way from the Near East. Apparently Britain was not affected. Britain -received the impulses which brought copper, bronze, and iron tools from -an original east Mediterranean homeland into Europe, almost at the ends -of their journeys. But by the same token, they had had time en route to -take on their characteristic European aspects. - -Some time ago, Sir Cyril Fox wrote a famous book called _The -Personality of Britain_, sub-titled Its Influence on Inhabitant and -Invader in Prehistoric and Early Historic Times. We have not gone -into the post-Roman early historic period here; there are still the -Anglo-Saxons and Normans to account for as well as the effects of -the Romans. But what I have tried to do was to begin the story of -how the personality of Britain was formed. The principles that Fox -used, in trying to balance cultural and environmental factors and -interrelationships would not be greatly different for other lands. - - - - -Summary - -[Illustration] - - -In the pages you have read so far, you have been brought through the -earliest 99 per cent of the story of mans life on this planet. I have -left only 1 per cent of the story for the historians to tell. - - -THE DRAMA OF THE PAST - -Men first became men when evolution had carried them to a certain -point. This was the point where the eye-hand-brain co-ordination was -good enough so that tools could be made. When tools began to be made -according to sets of lasting habits, we know that men had appeared. -This happened over a half million years ago. The stage for the play -may have been as broad as all of Europe, Africa, and Asia. At least, -it seems unlikely that it was only one little region that saw the -beginning of the drama. - -Glaciers and different climates came and went, to change the settings. -But the play went on in the same first act for a very long time. The -men who were the players had simple roles. They had to feed themselves -and protect themselves as best they could. They did this by hunting, -catching, and finding food wherever they could, and by taking such -protection as caves, fire, and their simple tools would give them. -Before the first act was over, the last of the glaciers was melting -away, and the players had added the New World to their stage. If -we want a special name for the first act, we could call it _The -Food-Gatherers_. - -There were not many climaxes in the first act, so far as we can see. -But I think there may have been a few. Certainly the pace of the -first act accelerated with the swing from simple gathering to more -intensified collecting. The great cave art of France and Spain was -probably an expression of a climax. Even the ideas of burying the dead -and of the Venus figurines must also point to levels of human thought -and activity that were over and above pure food-getting. - - -THE SECOND ACT - -The second act began only about ten thousand years ago. A few of the -players started it by themselves near the center of the Old World part -of the stage, in the Near East. It began as a plant and animal act, but -it soon became much more complicated. - -But the players in this one part of the stage--in the Near East--were -not the only ones to start off on the second act by themselves. Other -players, possibly in several places in the Far East, and certainly in -the New World, also started second acts that began as plant and animal -acts, and then became complicated. We can call the whole second act -_The Food-Producers_. - - -THE FIRST GREAT CLIMAX OF THE SECOND ACT - -In the Near East, the first marked climax of the second act happened -in Mesopotamia and Egypt. The play and the players reached that great -climax that we call civilization. This seems to have come less than -five thousand years after the second act began. But it could never have -happened in the first act at all. - -There is another curious thing about the first act. Many of the players -didnt know it was over and they kept on with their roles long after -the second act had begun. On the edges of the stage there are today -some players who are still going on with the first act. The Eskimos, -and the native Australians, and certain tribes in the Amazon jungle are -some of these players. They seem perfectly happy to keep on with the -first act. - -The second act moved from climax to climax. The civilizations of -Mesopotamia and Egypt were only the earliest of these climaxes. The -players to the west caught the spirit of the thing, and climaxes -followed there. So also did climaxes come in the Far Eastern and New -World portions of the stage. - -The greater part of the second act should really be described to you -by a historian. Although it was a very short act when compared to the -first one, the climaxes complicate it a great deal. I, a prehistorian, -have told you about only the first act, and the very beginning of the -second. - - -THE THIRD ACT - -Also, as a prehistorian I probably should not even mention the third -act--it began so recently. The third act is _The Industrialization_. -It is the one in which we ourselves are players. If the pace of the -second act was so much faster than that of the first, the pace of the -third act is terrific. The danger is that it may wear down the players -completely. - -What sort of climaxes will the third act have, and are we already in -one? You have seen by now that the acts of my play are given in terms -of modes or basic patterns of human economy--ways in which people -get food and protection and safety. The climaxes involve more than -human economy. Economics and technological factors may be part of the -climaxes, but they are not all. The climaxes may be revolutions in -their own way, intellectual and social revolutions if you like. - -If the third act follows the pattern of the second act, a climax should -come soon after the act begins. We may be due for one soon if we are -not already in it. Remember the terrific pace of this third act. - - -WHY BOTHER WITH PREHISTORY? - -Why do we bother about prehistory? The main reason is that we think it -may point to useful ideas for the present. We are in the troublesome -beginnings of the third act of the play. The beginnings of the second -act may have lessons for us and give depth to our thinking. I know -there are at least _some_ lessons, even in the present incomplete -state of our knowledge. The players who began the second act--that of -food-production--separately, in different parts of the world, were not -all of one pure race nor did they have pure cultural traditions. -Some apparently quite mixed Mediterraneans got off to the first start -on the second act and brought it to its first two climaxes as well. -Peoples of quite different physical type achieved the first climaxes in -China and in the New World. - -In our British example of how the late prehistory of Europe worked, we -listed a continuous series of invasions and reverberations. After -each of these came fusion. Even though the Channel protected Britain -from some of the extreme complications of the mixture and fusion of -continental Europe, you can see how silly it would be to refer to a -pure British race or a pure British culture. We speak of the United -States as a melting pot. But this is nothing new. Actually, Britain -and all the rest of the world have been melting pots at one time or -another. - -By the time the written records of Mesopotamia and Egypt begin to turn -up in number, the climaxes there are well under way. To understand the -beginnings of the climaxes, and the real beginnings of the second act -itself, we are thrown back on prehistoric archeology. And this is as -true for China, India, Middle America, and the Andes, as it is for the -Near East. - -There are lessons to be learned from all of mans past, not simply -lessons of how to fight battles or win peace conferences, but of how -human society evolves from one stage to another. Many of these lessons -can only be looked for in the prehistoric past. So far, we have only -made a beginning. There is much still to do, and many gaps in the story -are yet to be filled. The prehistorians job is to find the evidence, -to fill the gaps, and to discover the lessons men have learned in the -past. As I see it, this is not only an exciting but a very practical -goal for which to strive. - - - - -List of Books - - -BOOKS OF GENERAL INTEREST - -(Chosen from a variety of the increasingly useful list of cheap -paperbound books.) - - Childe, V. Gordon - _What Happened in History._ 1954. Penguin. - _Man Makes Himself._ 1955. Mentor. - _The Prehistory of European Society._ 1958. Penguin. - - Dunn, L. C., and Dobzhansky, Th. - _Heredity, Race, and Society._ 1952. Mentor. - - Frankfort, Henri, Frankfort, H. A., Jacobsen, Thorkild, and Wilson, - John A. - _Before Philosophy._ 1954. Penguin. - - Simpson, George G. - _The Meaning of Evolution._ 1955. Mentor. - - Wheeler, Sir Mortimer - _Archaeology from the Earth._ 1956. Penguin. - - -GEOCHRONOLOGY AND THE ICE AGE - -(Two general books. Some Pleistocene geologists disagree with Zeuners -interpretation of the dating evidence, but their points of view appear -in professional journals, in articles too cumbersome to list here.) - - Flint, R. F. - _Glacial Geology and the Pleistocene Epoch._ 1947. John Wiley - and Sons. - - Zeuner, F. E. - _Dating the Past._ 1952 (3rd ed.). Methuen and Co. - - -FOSSIL MEN AND RACE - -(The points of view of physical anthropologists and human -paleontologists are changing very quickly. Two of the different points -of view are listed here.) - - Clark, W. E. Le Gros - _History of the Primates._ 1956 (5th ed.). British Museum - (Natural History). (Also in Phoenix edition, 1957.) - - Howells, W. W. - _Mankind So Far._ 1944. Doubleday, Doran. - - -GENERAL ANTHROPOLOGY - -(These are standard texts not absolutely up to date in every detail, or -interpretative essays concerned with cultural change through time as -well as in space.) - - Kroeber, A. L. - _Anthropology._ 1948. Harcourt, Brace. - - Linton, Ralph - _The Tree of Culture._ 1955. Alfred A. Knopf, Inc. - - Redfield, Robert - _The Primitive World and Its Transformations._ 1953. Cornell - University Press. - - Steward, Julian H. - _Theory of Culture Change._ 1955. University of Illinois Press. - - White, Leslie - _The Science of Culture._ 1949. Farrar, Strauss. - - -GENERAL PREHISTORY - -(A sampling of the more useful and current standard works in English.) - - Childe, V. Gordon - _The Dawn of European Civilization._ 1957. Kegan Paul, Trench, - Trubner. - _Prehistoric Migrations in Europe._ 1950. Instituttet for - Sammenlignende Kulturforskning. - - Clark, Grahame - _Archaeology and Society._ 1957. Harvard University Press. - - Clark, J. G. D. - _Prehistoric Europe: The Economic Basis._ 1952. Methuen and Co. - - Garrod, D. A. E. - _Environment, Tools, and Man._ 1946. Cambridge University - Press. - - Movius, Hallam L., Jr. - Old World Prehistory: Paleolithic in _Anthropology Today_. - Kroeber, A. L., ed. 1953. University of Chicago Press. - - Oakley, Kenneth P. - _Man the Tool-Maker._ 1956. British Museum (Natural History). - (Also in Phoenix edition, 1957.) - - Piggott, Stuart - _British Prehistory._ 1949. Oxford University Press. - - Pittioni, Richard - _Die Urgeschichtlichen Grundlagen der Europischen Kultur._ - 1949. Deuticke. (A single book which does attempt to cover the - whole range of European prehistory to ca. 1 A.D.) - - -THE NEAR EAST - - Adams, Robert M. - Developmental Stages in Ancient Mesopotamia, _in_ Steward, - Julian, _et al_, _Irrigation Civilizations: A Comparative - Study_. 1955. Pan American Union. - - Braidwood, Robert J. - _The Near East and the Foundations for Civilization._ 1952. - University of Oregon. - - Childe, V. Gordon - _New Light on the Most Ancient East._ 1952. Oriental Dept., - Routledge and Kegan Paul. - - Frankfort, Henri - _The Birth of Civilization in the Near East._ 1951. University - of Indiana Press. (Also in Anchor edition, 1956.) - - Pallis, Svend A. - _The Antiquity of Iraq._ 1956. Munksgaard. - - Wilson, John A. - _The Burden of Egypt._ 1951. University of Chicago Press. (Also - in Phoenix edition, called _The Culture of Ancient Egypt_, - 1956.) - - -HOW DIGGING IS DONE - - Braidwood, Linda - _Digging beyond the Tigris._ 1953. Schuman, New York. - - Wheeler, Sir Mortimer - _Archaeology from the Earth._ 1954. Oxford, London. - - - - -Index - - - Abbevillian, 48; - core-biface tool, 44, 48 - - Acheulean, 48, 60 - - Acheuleo-Levalloisian, 63 - - Acheuleo-Mousterian, 63 - - Adams, R. M., 106 - - Adzes, 45 - - Africa, east, 67, 89; - north, 70, 89; - south, 22, 25, 34, 40, 67 - - Agriculture, incipient, in England, 140; - in Near East, 123 - - Ain Hanech, 48 - - Amber, taken from Baltic to Greece, 167 - - American Indians, 90, 142 - - Anatolia, used as route to Europe, 138 - - Animals, in caves, 54, 64; - in cave art, 85 - - Antevs, Ernst, 19 - - Anyathian, 47 - - Archeological interpretation, 8 - - Archeology, defined, 8 - - Architecture, at Jarmo, 128; - at Jericho, 133 - - Arrow, points, 94; - shaft straightener, 83 - - Art, in caves, 84; - East Spanish, 85; - figurines, 84; - Franco-Cantabrian, 84, 85; - movable (engravings, modeling, scratchings), 83; - painting, 83; - sculpture, 83 - - Asia, western, 67 - - Assemblage, defined, 13, 14; - European, 94; - Jarmo, 129; - Maglemosian, 94; - Natufian, 113 - - Aterian, industry, 67; - point, 89 - - Australopithecinae, 24 - - Australopithecine, 25, 26 - - Awls, 77 - - Axes, 62, 94 - - Ax-heads, 15 - - Azilian, 97 - - Aztecs, 145 - - - Baghouz, 152 - - Bakun, 134 - - Baltic sea, 93 - - Banana, 107 - - Barley, wild, 108 - - Barrow, 141 - - Battle-axe folk, 164; - assemblage, 164 - - Beads, 80; - bone, 114 - - Beaker folk, 164; - assemblage, 164-165 - - Bear, in cave art, 85; - cult, 68 - - Belgium, 94 - - Belt cave, 126 - - Bering Strait, used as route to New World, 98 - - Bison, in cave art, 85 - - Blade, awl, 77; - backed, 75; - blade-core, 71; - end-scraper, 77; - stone, defined, 71; - strangulated (notched), 76; - tanged point, 76; - tools, 71, 75-80, 90; - tool tradition, 70 - - Boar, wild, in cave art, 85 - - Bogs, source of archeological materials, 94 - - Bolas, 54 - - Bordes, Franois, 62 - - Borer, 77 - - Boskop skull, 34 - - Boyd, William C., 35 - - Bracelets, 118 - - Brain, development of, 24 - - Breadfruit, 107 - - Breasted, James H., 107 - - Brick, at Jericho, 133 - - Britain, 94; - late prehistory, 163-175; - invaders, 173 - - Broch, 172 - - Buffalo, in China, 54; - killed by stampede, 86 - - Burials, 66, 86; - in henges, 164; - in urns, 168 - - Burins, 75 - - Burma, 90 - - Byblos, 134 - - - Camel, 54 - - Cannibalism, 55 - - Cattle, wild, 85, 112; - in cave art, 85; - domesticated, 15; - at Skara Brae, 142 - - Caucasoids, 34 - - Cave men, 29 - - Caves, 62; - art in, 84 - - Celts, 170 - - Chariot, 160 - - Chicken, domestication of, 107 - - Chiefs, in food-gathering groups, 68 - - Childe, V. Gordon, 8 - - China, 136 - - Choukoutien, 28, 35 - - Choukoutienian, 47 - - Civilization, beginnings, 144, 149, 157; - meaning of, 144 - - Clactonian, 45, 47 - - Clay, used in modeling, 128; - baked, used for tools, 153 - - Club-heads, 82, 94 - - Colonization, in America, 142; - in Europe, 142 - - Combe Capelle, 30 - - Combe Capelle-Brnn group, 34 - - Commont, Victor, 51 - - Coon, Carlton S., 73 - - Copper, 134 - - Corn, in America, 145 - - Corrals for cattle, 140 - - Cradle of mankind, 136 - - Cremation, 167 - - Crete, 162 - - Cro-Magnon, 30, 34 - - Cultivation, incipient, 105, 109, 111 - - Culture, change, 99; - characteristics, defined, 38, 49; - prehistoric, 39 - - - Danube Valley, used as route from Asia, 138 - - Dates, 153 - - Deer, 54, 96 - - Dog, domesticated, 96 - - Domestication, of animals, 100, 105, 107; - of plants, 100 - - Dragon teeth fossils in China, 28 - - Drill, 77 - - Dubois, Eugene, 26 - - - Early Dynastic Period, Mesopotamia, 147 - - East Spanish art, 72, 85 - - Egypt, 70, 126 - - Ehringsdorf, 31 - - Elephant, 54 - - Emiliani, Cesare, 18 - - Emiran flake point, 73 - - England, 163-168; - prehistoric, 19, 40; - farmers in, 140 - - Eoanthropus dawsoni, 29 - - Eoliths, 41 - - Erich, 152 - - Eridu, 152 - - Euphrates River, floods in, 148 - - Europe, cave dwellings, 58; - at end of Ice Age, 93; - early farmers, 140; - glaciers in, 40; - huts in, 86; - routes into, 137-140; - spread of food-production to, 136 - - - Far East, 69, 90 - - Farmers, 103 - - Fauresmith industry, 67 - - Fayum, 135; - radiocarbon date, 146 - - Fertile Crescent, 107, 146 - - Figurines, Venus, 84; - at Jarmo, 128; - at Ubaid, 153 - - Fire, used by Peking man, 54 - - First Dynasty, Egypt, 147 - - Fish-hooks, 80, 94 - - Fishing, 80; - by food-producers, 122 - - Fish-lines, 80 - - Fish spears, 94 - - Flint industry, 127 - - Fontchevade, 32, 56, 58 - - Food-collecting, 104, 121; - end of, 104 - - Food-gatherers, 53, 176 - - Food-gathering, 99, 104; - in Old World, 104; - stages of, 104 - - Food-producers, 176 - - Food-producing economy, 122; - in America, 145; - in Asia, 105 - - Food-producing revolution, 99, 105; - causes of, 101; - preconditions for, 100 - - Food-production, beginnings of, 99; - carried to Europe, 110 - - Food-vessel folk, 164 - - Forest folk, 97, 98, 104, 110 - - Fox, Sir Cyril, 174 - - France, caves in, 56 - - - Galley Hill (fossil type), 29 - - Garrod, D. A., 73 - - Gazelle, 114 - - Germany, 94 - - Ghassul, 156 - - Glaciers, 18, 30; - destruction by, 40 - - Goat, wild, 108; - domesticated, 128 - - Grain, first planted, 20 - - Graves, passage, 141; - gallery, 141 - - Greece, civilization in, 163; - as route to western Europe, 138; - towns in, 162 - - Grimaldi skeletons, 34 - - - Hackberry seeds used as food, 55 - - Halaf, 151; - assemblage, 151 - - Hallstatt, tradition, 169 - - Hand, development of, 24, 25 - - Hand adzes, 46 - - Hand axes, 44 - - Harpoons, antler, 83, 94; - bone, 82, 94 - - Hassuna, 131; - assemblage, 131, 132 - - Heidelberg, fossil type, 28 - - Hill-forts, in England, 171; - in Scotland, 172 - - Hilly flanks of Near East, 107, 108, 125, 131, 146, 147 - - History, beginning of, 7, 17 - - Hoes, 112 - - Holland, 164 - - Homo sapiens, 32 - - Hooton, E. A., 34 - - Horse, 112; - wild, in cave art, 85; - in China, 54 - - Hotu cave, 126 - - Houses, 122; - at Jarmo, 128; - at Halaf, 151 - - Howe, Bruce, 116 - - Howell, F. Clark, 30 - - Hunting, 93 - - - Ice Age, in Asia, 99; - beginning of, 18; - glaciers in, 41; - last glaciation, 93 - - Incas, 145 - - India, 90, 136 - - Industrialization, 178 - - Industry, blade-tool, 88; - defined, 58; - ground stone, 94 - - Internationalism, 162 - - Iran, 107, 147 - - Iraq, 107, 124, 127, 136, 147 - - Iron, introduction of, 170 - - Irrigation, 123, 149, 155 - - Italy, 138 - - - Jacobsen, T. J., 157 - - Jarmo, 109, 126, 128, 130; - assemblage, 129 - - Java, 23, 29 - - Java man, 26, 27, 29 - - Jefferson, Thomas, 11 - - Jericho, 119, 133 - - Judaidah, 134 - - - Kafuan, 48 - - Kanam, 23, 36 - - Karim Shahir, 116-119, 124; - assemblage, 116, 117 - - Keith, Sir Arthur, 33 - - Kelley, Harper, 51 - - Kharga, 126 - - Khartoum, 136 - - Knives, 80 - - Krogman, W. M., 3, 25 - - - Lamps, 85 - - Land bridges in Mediterranean, 19 - - La Tne phase, 170 - - Laurel leaf point, 78, 89 - - Leakey, L. S. B., 40 - - Le Moustier, 57 - - Levalloisian, 47, 61, 62 - - Levalloiso-Mousterian, 47, 63 - - Little Woodbury, 170 - - - Magic, used by hunters, 123 - - Maglemosian, assemblage, 94, 95; - folk, 98 - - Makapan, 40 - - Mammoth, 93; - in cave art, 85 - - Man-apes, 26 - - Mango, 107 - - Mankind, age, 17 - - Maringer, J., 45 - - Markets, 155 - - Marston, A. T., 11 - - Mathiassen, T., 97 - - McCown, T. D., 33 - - Meganthropus, 26, 27, 36 - - Men, defined, 25; - modern, 32 - - Merimde, 135 - - Mersin, 133 - - Metal-workers, 160, 163, 167, 172 - - Micoquian, 48, 60 - - Microliths, 87; - at Jarmo, 130; - lunates, 87; - trapezoids, 87; - triangles, 87 - - Minerals used as coloring matter, 66 - - Mine-shafts, 140 - - Mlefaat, 126, 127 - - Mongoloids, 29, 90 - - Mortars, 114, 118, 127 - - Mounds, how formed, 12 - - Mount Carmel, 11, 33, 52, 59, 64, 69, 113, 114 - - Mousterian man, 64 - - Mousterian tools, 61, 62; - of Acheulean tradition, 62 - - Movius, H. L., 47 - - - Natufian, animals in, 114; - assemblage, 113, 114, 115; - burials, 114; - date of, 113 - - Neanderthal man, 29, 30, 31, 56 - - Near East, beginnings of civilization in, 20, 144; - cave sites, 58; - climate in Ice Age, 99; - Fertile Crescent, 107, 146; - food-production in, 99; - Natufian assemblage in, 113-115; - stone tools, 114 - - Needles, 80 - - Negroid, 34 - - New World, 90 - - Nile River valley, 102, 134; - floods in, 148 - - Nuclear area, 106, 110; - in Near East, 107 - - - Obsidian, used for blade tools, 71; - at Jarmo, 130 - - Ochre, red, with burials, 86 - - Oldowan, 48 - - Old World, 67, 70, 90; - continental phases in, 18 - - Olorgesailie, 40, 51 - - Ostrich, in China, 54 - - Ovens, 128 - - Oxygen isotopes, 18 - - - Paintings in caves, 83 - - Paleoanthropic man, 50 - - Palestine, burials, 56; - cave sites, 52; - types of man, 69 - - Parpallo, 89 - - Patjitanian, 45, 47 - - Pebble tools, 42 - - Peking cave, 54; - animals in, 54 - - Peking man, 27, 28, 29, 54, 58 - - Pendants, 80; - bone, 114 - - Pestle, 114 - - Peterborough, 141; - assemblage, 141 - - Pictographic signs, 158 - - Pig, wild, 108 - - Piltdown man, 29 - - Pins, 80 - - Pithecanthropus, 26, 27, 30, 36 - - Pleistocene, 18, 25 - - Plows developed, 123 - - Points, arrow, 76; - laurel leaf, 78; - shouldered, 78, 79; - split-based bone, 80, 82; - tanged, 76; - willow leaf, 78 - - Potatoes, in America, 145 - - Pottery, 122, 130, 156; - decorated, 142; - painted, 131, 151, 152; - Susa style, 156; - in tombs, 141 - - Prehistory, defined, 7; - range of, 18 - - Pre-neanderthaloids, 30, 31, 37 - - Pre-Solutrean point, 89 - - Pre-Stellenbosch, 48 - - Proto-Literate assemblage, 157-160 - - - Race, 35; - biological, 36; - pure, 16 - - Radioactivity, 9, 10 - - Radioactive carbon dates, 18, 92, 120, 130, 135, 156 - - Redfield, Robert, 38, 49 - - Reed, C. A., 128 - - Reindeer, 94 - - Rhinoceros, 93; - in cave art, 85 - - Rhodesian man, 32 - - Riss glaciation, 58 - - Rock-shelters, 58; - art in, 85 - - - Saccopastore, 31 - - Sahara Desert, 34, 102 - - Samarra, 152; - pottery, 131, 152 - - Sangoan industry, 67 - - Sauer, Carl, 136 - - Sbaikian point, 89 - - Schliemann, H., 11, 12 - - Scotland, 171 - - Scraper, flake, 79; - end-scraper on blade, 77, 78; - keel-shaped, 79, 80, 81 - - Sculpture in caves, 83 - - Sebilian III, 126 - - Shaheinab, 135 - - Sheep, wild, 108; - at Skara Brae, 142; - in China, 54 - - Shellfish, 142 - - Ship, Ubaidian, 153 - - Sialk, 126, 134; - assemblage, 134 - - Siberia, 88; - pathway to New World, 98 - - Sickle, 112, 153; - blade, 113, 130 - - Silo, 122 - - Sinanthropus, 27, 30, 35 - - Skara Brae, 142 - - Snails used as food, 128 - - Soan, 47 - - Solecki, R., 116 - - Solo (fossil type), 29, 32 - - Solutrean industry, 77 - - Spear, shaft, 78; - thrower, 82, 83 - - Speech, development of organs of, 25 - - Squash, in America, 145 - - Steinheim fossil skull, 28 - - Stillbay industry, 67 - - Stonehenge, 166 - - Stratification, in caves, 12, 57; - in sites, 12 - - Swanscombe (fossil type), 11, 28 - - Syria, 107 - - - Tabun, 60, 71 - - Tardenoisian, 97 - - Taro, 107 - - Tasa, 135 - - Tayacian, 47, 59 - - Teeth, pierced, in beads and pendants, 114 - - Temples, 123, 155 - - Tepe Gawra, 156 - - Ternafine, 29 - - Teshik Tash, 69 - - Textiles, 122 - - Thong-stropper, 80 - - Tigris River, floods in, 148 - - Toggle, 80 - - Tomatoes, in America, 145 - - Tombs, megalithic, 141 - - Tool-making, 42, 49 - - Tool-preparation traditions, 65 - - Tools, 62; - antler, 80; - blade, 70, 71, 75; - bone, 66; - chopper, 47; - core-biface, 43, 48, 60, 61; - flake, 44, 47, 51, 60, 64; - flint, 80, 127; - ground stone, 68, 127; - handles, 94; - pebble, 42, 43, 48, 53; - use of, 24 - - Touf (mud wall), 128 - - Toynbee, A. J., 101 - - Trade, 130, 155, 162 - - Traders, 167 - - Traditions, 15; - blade tool, 70; - definition of, 51; - interpretation of, 49; - tool-making, 42, 48; - chopper-tool, 47; - chopper-chopping tool, 45; - core-biface, 43, 48; - flake, 44, 47; - pebble tool, 42, 48 - - Tool-making, prehistory of, 42 - - Turkey, 107, 108 - - - Ubaid, 153; - assemblage, 153-155 - - Urnfields, 168, 169 - - - Village-farming community era, 105, 119 - - - Wad B, 72 - - Wadjak, 34 - - Warka phase, 156; - assemblage, 156 - - Washburn, Sherwood L., 36 - - Water buffalo, domestication of, 107 - - Weidenreich, F., 29, 34 - - Wessex, 166, 167 - - Wheat, wild, 108; - partially domesticated, 127 - - Willow leaf point, 78 - - Windmill Hill, 138; - assemblage, 138, 140 - - Witch doctors, 68 - - Wool, 112; - in garments, 167 - - Writing, 158; - cuneiform, 158 - - Wrm I glaciation, 58 - - - Zebu cattle, domestication of, 107 - - Zeuner, F. E., 73 - - - - - * * * * * * - - - - -Transcribers note: - -Punctuation, hyphenation, and spelling were made consistent when a -predominant preference was found in this book; otherwise they were not -changed. - -Simple typographical errors were corrected; occasional unbalanced -quotation marks retained. - -Ambiguous hyphens at the ends of lines were retained. - -Index not checked for proper alphabetization or correct page references. - -In the original book, chapter headings were accompanied by -illustrations, sometimes above, sometimes below, and sometimes -adjacent. In this eBook those ilustrations always appear below the -headings. - - - -***END OF THE PROJECT GUTENBERG EBOOK PREHISTORIC MEN*** - - -******* This file should be named 52664-0.txt or 52664-0.zip ******* - - -This and all associated files of various formats will be found in: -http://www.gutenberg.org/dirs/5/2/6/6/52664 - - -Updated editions will replace the previous one--the old editions will -be renamed. - -Creating the works from print editions not protected by U.S. copyright -law means that no one owns a United States copyright in these works, -so the Foundation (and you!) can copy and distribute it in the United -States without permission and without paying copyright -royalties. Special rules, set forth in the General Terms of Use part -of this license, apply to copying and distributing Project -Gutenberg-tm electronic works to protect the PROJECT GUTENBERG-tm -concept and trademark. Project Gutenberg is a registered trademark, -and may not be used if you charge for the eBooks, unless you receive -specific permission. If you do not charge anything for copies of this -eBook, complying with the rules is very easy. You may use this eBook -for nearly any purpose such as creation of derivative works, reports, -performances and research. They may be modified and printed and given -away--you may do practically ANYTHING in the United States with eBooks -not protected by U.S. copyright law. Redistribution is subject to the -trademark license, especially commercial redistribution. - -START: FULL LICENSE - -THE FULL PROJECT GUTENBERG LICENSE -PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK - -To protect the Project Gutenberg-tm mission of promoting the free -distribution of electronic works, by using or distributing this work -(or any other work associated in any way with the phrase "Project -Gutenberg"), you agree to comply with all the terms of the Full -Project Gutenberg-tm License available with this file or online at -www.gutenberg.org/license. - -Section 1. General Terms of Use and Redistributing Project -Gutenberg-tm electronic works - -1.A. By reading or using any part of this Project Gutenberg-tm -electronic work, you indicate that you have read, understand, agree to -and accept all the terms of this license and intellectual property -(trademark/copyright) agreement. If you do not agree to abide by all -the terms of this agreement, you must cease using and return or -destroy all copies of Project Gutenberg-tm electronic works in your -possession. If you paid a fee for obtaining a copy of or access to a -Project Gutenberg-tm electronic work and you do not agree to be bound -by the terms of this agreement, you may obtain a refund from the -person or entity to whom you paid the fee as set forth in paragraph -1.E.8. - -1.B. "Project Gutenberg" is a registered trademark. It may only be -used on or associated in any way with an electronic work by people who -agree to be bound by the terms of this agreement. There are a few -things that you can do with most Project Gutenberg-tm electronic works -even without complying with the full terms of this agreement. See -paragraph 1.C below. There are a lot of things you can do with Project -Gutenberg-tm electronic works if you follow the terms of this -agreement and help preserve free future access to Project Gutenberg-tm -electronic works. See paragraph 1.E below. - -1.C. The Project Gutenberg Literary Archive Foundation ("the -Foundation" or PGLAF), owns a compilation copyright in the collection -of Project Gutenberg-tm electronic works. Nearly all the individual -works in the collection are in the public domain in the United -States. If an individual work is unprotected by copyright law in the -United States and you are located in the United States, we do not -claim a right to prevent you from copying, distributing, performing, -displaying or creating derivative works based on the work as long as -all references to Project Gutenberg are removed. Of course, we hope -that you will support the Project Gutenberg-tm mission of promoting -free access to electronic works by freely sharing Project Gutenberg-tm -works in compliance with the terms of this agreement for keeping the -Project Gutenberg-tm name associated with the work. You can easily -comply with the terms of this agreement by keeping this work in the -same format with its attached full Project Gutenberg-tm License when -you share it without charge with others. - -1.D. The copyright laws of the place where you are located also govern -what you can do with this work. Copyright laws in most countries are -in a constant state of change. If you are outside the United States, -check the laws of your country in addition to the terms of this -agreement before downloading, copying, displaying, performing, -distributing or creating derivative works based on this work or any -other Project Gutenberg-tm work. The Foundation makes no -representations concerning the copyright status of any work in any -country outside the United States. - -1.E. Unless you have removed all references to Project Gutenberg: - -1.E.1. The following sentence, with active links to, or other -immediate access to, the full Project Gutenberg-tm License must appear -prominently whenever any copy of a Project Gutenberg-tm work (any work -on which the phrase "Project Gutenberg" appears, or with which the -phrase "Project Gutenberg" is associated) is accessed, displayed, -performed, viewed, copied or distributed: - - This eBook is for the use of anyone anywhere in the United States and - most other parts of the world at no cost and with almost no - restrictions whatsoever. You may copy it, give it away or re-use it - under the terms of the Project Gutenberg License included with this - eBook or online at www.gutenberg.org. If you are not located in the - United States, you'll have to check the laws of the country where you - are located before using this ebook. - -1.E.2. If an individual Project Gutenberg-tm electronic work is -derived from texts not protected by U.S. copyright law (does not -contain a notice indicating that it is posted with permission of the -copyright holder), the work can be copied and distributed to anyone in -the United States without paying any fees or charges. If you are -redistributing or providing access to a work with the phrase "Project -Gutenberg" associated with or appearing on the work, you must comply -either with the requirements of paragraphs 1.E.1 through 1.E.7 or -obtain permission for the use of the work and the Project Gutenberg-tm -trademark as set forth in paragraphs 1.E.8 or 1.E.9. - -1.E.3. If an individual Project Gutenberg-tm electronic work is posted -with the permission of the copyright holder, your use and distribution -must comply with both paragraphs 1.E.1 through 1.E.7 and any -additional terms imposed by the copyright holder. Additional terms -will be linked to the Project Gutenberg-tm License for all works -posted with the permission of the copyright holder found at the -beginning of this work. - -1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm -License terms from this work, or any files containing a part of this -work or any other work associated with Project Gutenberg-tm. - -1.E.5. Do not copy, display, perform, distribute or redistribute this -electronic work, or any part of this electronic work, without -prominently displaying the sentence set forth in paragraph 1.E.1 with -active links or immediate access to the full terms of the Project -Gutenberg-tm License. - -1.E.6. You may convert to and distribute this work in any binary, -compressed, marked up, nonproprietary or proprietary form, including -any word processing or hypertext form. However, if you provide access -to or distribute copies of a Project Gutenberg-tm work in a format -other than "Plain Vanilla ASCII" or other format used in the official -version posted on the official Project Gutenberg-tm web site -(www.gutenberg.org), you must, at no additional cost, fee or expense -to the user, provide a copy, a means of exporting a copy, or a means -of obtaining a copy upon request, of the work in its original "Plain -Vanilla ASCII" or other form. Any alternate format must include the -full Project Gutenberg-tm License as specified in paragraph 1.E.1. - -1.E.7. Do not charge a fee for access to, viewing, displaying, -performing, copying or distributing any Project Gutenberg-tm works -unless you comply with paragraph 1.E.8 or 1.E.9. - -1.E.8. You may charge a reasonable fee for copies of or providing -access to or distributing Project Gutenberg-tm electronic works -provided that - -* You pay a royalty fee of 20% of the gross profits you derive from - the use of Project Gutenberg-tm works calculated using the method - you already use to calculate your applicable taxes. The fee is owed - to the owner of the Project Gutenberg-tm trademark, but he has - agreed to donate royalties under this paragraph to the Project - Gutenberg Literary Archive Foundation. Royalty payments must be paid - within 60 days following each date on which you prepare (or are - legally required to prepare) your periodic tax returns. Royalty - payments should be clearly marked as such and sent to the Project - Gutenberg Literary Archive Foundation at the address specified in - Section 4, "Information about donations to the Project Gutenberg - Literary Archive Foundation." - -* You provide a full refund of any money paid by a user who notifies - you in writing (or by e-mail) within 30 days of receipt that s/he - does not agree to the terms of the full Project Gutenberg-tm - License. You must require such a user to return or destroy all - copies of the works possessed in a physical medium and discontinue - all use of and all access to other copies of Project Gutenberg-tm - works. - -* You provide, in accordance with paragraph 1.F.3, a full refund of - any money paid for a work or a replacement copy, if a defect in the - electronic work is discovered and reported to you within 90 days of - receipt of the work. - -* You comply with all other terms of this agreement for free - distribution of Project Gutenberg-tm works. - -1.E.9. If you wish to charge a fee or distribute a Project -Gutenberg-tm electronic work or group of works on different terms than -are set forth in this agreement, you must obtain permission in writing -from both the Project Gutenberg Literary Archive Foundation and The -Project Gutenberg Trademark LLC, the owner of the Project Gutenberg-tm -trademark. Contact the Foundation as set forth in Section 3 below. - -1.F. - -1.F.1. Project Gutenberg volunteers and employees expend considerable -effort to identify, do copyright research on, transcribe and proofread -works not protected by U.S. copyright law in creating the Project -Gutenberg-tm collection. Despite these efforts, Project Gutenberg-tm -electronic works, and the medium on which they may be stored, may -contain "Defects," such as, but not limited to, incomplete, inaccurate -or corrupt data, transcription errors, a copyright or other -intellectual property infringement, a defective or damaged disk or -other medium, a computer virus, or computer codes that damage or -cannot be read by your equipment. - -1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right -of Replacement or Refund" described in paragraph 1.F.3, the Project -Gutenberg Literary Archive Foundation, the owner of the Project -Gutenberg-tm trademark, and any other party distributing a Project -Gutenberg-tm electronic work under this agreement, disclaim all -liability to you for damages, costs and expenses, including legal -fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT -LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE -PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE FOUNDATION, THE -TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE -LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR -INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH -DAMAGE. - -1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a -defect in this electronic work within 90 days of receiving it, you can -receive a refund of the money (if any) you paid for it by sending a -written explanation to the person you received the work from. If you -received the work on a physical medium, you must return the medium -with your written explanation. The person or entity that provided you -with the defective work may elect to provide a replacement copy in -lieu of a refund. If you received the work electronically, the person -or entity providing it to you may choose to give you a second -opportunity to receive the work electronically in lieu of a refund. If -the second copy is also defective, you may demand a refund in writing -without further opportunities to fix the problem. - -1.F.4. Except for the limited right of replacement or refund set forth -in paragraph 1.F.3, this work is provided to you 'AS-IS', WITH NO -OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PURPOSE. - -1.F.5. Some states do not allow disclaimers of certain implied -warranties or the exclusion or limitation of certain types of -damages. If any disclaimer or limitation set forth in this agreement -violates the law of the state applicable to this agreement, the -agreement shall be interpreted to make the maximum disclaimer or -limitation permitted by the applicable state law. The invalidity or -unenforceability of any provision of this agreement shall not void the -remaining provisions. - -1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the -trademark owner, any agent or employee of the Foundation, anyone -providing copies of Project Gutenberg-tm electronic works in -accordance with this agreement, and any volunteers associated with the -production, promotion and distribution of Project Gutenberg-tm -electronic works, harmless from all liability, costs and expenses, -including legal fees, that arise directly or indirectly from any of -the following which you do or cause to occur: (a) distribution of this -or any Project Gutenberg-tm work, (b) alteration, modification, or -additions or deletions to any Project Gutenberg-tm work, and (c) any -Defect you cause. - -Section 2. Information about the Mission of Project Gutenberg-tm - -Project Gutenberg-tm is synonymous with the free distribution of -electronic works in formats readable by the widest variety of -computers including obsolete, old, middle-aged and new computers. It -exists because of the efforts of hundreds of volunteers and donations -from people in all walks of life. - -Volunteers and financial support to provide volunteers with the -assistance they need are critical to reaching Project Gutenberg-tm's -goals and ensuring that the Project Gutenberg-tm collection will -remain freely available for generations to come. In 2001, the Project -Gutenberg Literary Archive Foundation was created to provide a secure -and permanent future for Project Gutenberg-tm and future -generations. To learn more about the Project Gutenberg Literary -Archive Foundation and how your efforts and donations can help, see -Sections 3 and 4 and the Foundation information page at -www.gutenberg.org - -Section 3. Information about the Project Gutenberg Literary -Archive Foundation - -The Project Gutenberg Literary Archive Foundation is a non profit -501(c)(3) educational corporation organized under the laws of the -state of Mississippi and granted tax exempt status by the Internal -Revenue Service. The Foundation's EIN or federal tax identification -number is 64-6221541. Contributions to the Project Gutenberg Literary -Archive Foundation are tax deductible to the full extent permitted by -U.S. federal laws and your state's laws. - -The Foundation's principal office is in Fairbanks, Alaska, with the -mailing address: PO Box 750175, Fairbanks, AK 99775, but its -volunteers and employees are scattered throughout numerous -locations. Its business office is located at 809 North 1500 West, Salt -Lake City, UT 84116, (801) 596-1887. Email contact links and up to -date contact information can be found at the Foundation's web site and -official page at www.gutenberg.org/contact - -For additional contact information: - - Dr. Gregory B. Newby - Chief Executive and Director - gbnewby@pglaf.org - -Section 4. Information about Donations to the Project Gutenberg -Literary Archive Foundation - -Project Gutenberg-tm depends upon and cannot survive without wide -spread public support and donations to carry out its mission of -increasing the number of public domain and licensed works that can be -freely distributed in machine readable form accessible by the widest -array of equipment including outdated equipment. Many small donations -($1 to $5,000) are particularly important to maintaining tax exempt -status with the IRS. - -The Foundation is committed to complying with the laws regulating -charities and charitable donations in all 50 states of the United -States. Compliance requirements are not uniform and it takes a -considerable effort, much paperwork and many fees to meet and keep up -with these requirements. We do not solicit donations in locations -where we have not received written confirmation of compliance. To SEND -DONATIONS or determine the status of compliance for any particular -state visit www.gutenberg.org/donate - -While we cannot and do not solicit contributions from states where we -have not met the solicitation requirements, we know of no prohibition -against accepting unsolicited donations from donors in such states who -approach us with offers to donate. - -International donations are gratefully accepted, but we cannot make -any statements concerning tax treatment of donations received from -outside the United States. U.S. laws alone swamp our small staff. - -Please check the Project Gutenberg Web pages for current donation -methods and addresses. Donations are accepted in a number of other -ways including checks, online payments and credit card donations. To -donate, please visit: www.gutenberg.org/donate - -Section 5. General Information About Project Gutenberg-tm electronic works. - -Professor Michael S. Hart was the originator of the Project -Gutenberg-tm concept of a library of electronic works that could be -freely shared with anyone. For forty years, he produced and -distributed Project Gutenberg-tm eBooks with only a loose network of -volunteer support. - -Project Gutenberg-tm eBooks are often created from several printed -editions, all of which are confirmed as not protected by copyright in -the U.S. unless a copyright notice is included. Thus, we do not -necessarily keep eBooks in compliance with any particular paper -edition. - -Most people start at our Web site which has the main PG search -facility: www.gutenberg.org - -This Web site includes information about Project Gutenberg-tm, -including how to make donations to the Project Gutenberg Literary -Archive Foundation, how to help produce our new eBooks, and how to -subscribe to our email newsletter to hear about new eBooks. diff --git a/ciphers/XOR_cipher.py b/ciphers/XOR_cipher.py deleted file mode 100644 index 727fac3b0..000000000 --- a/ciphers/XOR_cipher.py +++ /dev/null @@ -1,209 +0,0 @@ -""" - author: Christian Bender - date: 21.12.2017 - class: XORCipher - - This class implements the XOR-cipher algorithm and provides - some useful methods for encrypting and decrypting strings and - files. - - Overview about methods - - - encrypt : list of char - - decrypt : list of char - - encrypt_string : str - - decrypt_string : str - - encrypt_file : boolean - - decrypt_file : boolean -""" -class XORCipher(object): - - def __init__(self, key = 0): - """ - simple constructor that receives a key or uses - default key = 0 - """ - - #private field - self.__key = key - - def encrypt(self, content, key): - """ - input: 'content' of type string and 'key' of type int - output: encrypted string 'content' as a list of chars - if key not passed the method uses the key by the constructor. - otherwise key = 1 - """ - - # precondition - assert (isinstance(key,int) and isinstance(content,str)) - - key = key or self.__key or 1 - - # make sure key can be any size - while (key > 255): - key -= 255 - - # This will be returned - ans = [] - - for ch in content: - ans.append(chr(ord(ch) ^ key)) - - return ans - - def decrypt(self,content,key): - """ - input: 'content' of type list and 'key' of type int - output: decrypted string 'content' as a list of chars - if key not passed the method uses the key by the constructor. - otherwise key = 1 - """ - - # precondition - assert (isinstance(key,int) and isinstance(content,list)) - - key = key or self.__key or 1 - - # make sure key can be any size - while (key > 255): - key -= 255 - - # This will be returned - ans = [] - - for ch in content: - ans.append(chr(ord(ch) ^ key)) - - return ans - - - def encrypt_string(self,content, key = 0): - """ - input: 'content' of type string and 'key' of type int - output: encrypted string 'content' - if key not passed the method uses the key by the constructor. - otherwise key = 1 - """ - - # precondition - assert (isinstance(key,int) and isinstance(content,str)) - - key = key or self.__key or 1 - - # make sure key can be any size - while (key > 255): - key -= 255 - - # This will be returned - ans = "" - - for ch in content: - ans += chr(ord(ch) ^ key) - - return ans - - def decrypt_string(self,content,key = 0): - """ - input: 'content' of type string and 'key' of type int - output: decrypted string 'content' - if key not passed the method uses the key by the constructor. - otherwise key = 1 - """ - - # precondition - assert (isinstance(key,int) and isinstance(content,str)) - - key = key or self.__key or 1 - - # make sure key can be any size - while (key > 255): - key -= 255 - - # This will be returned - ans = "" - - for ch in content: - ans += chr(ord(ch) ^ key) - - return ans - - - def encrypt_file(self, file, key = 0): - """ - input: filename (str) and a key (int) - output: returns true if encrypt process was - successful otherwise false - if key not passed the method uses the key by the constructor. - otherwise key = 1 - """ - - #precondition - assert (isinstance(file,str) and isinstance(key,int)) - - try: - with open(file,"r") as fin: - with open("encrypt.out","w+") as fout: - - # actual encrypt-process - for line in fin: - fout.write(self.encrypt_string(line,key)) - - except: - return False - - return True - - - def decrypt_file(self,file, key): - """ - input: filename (str) and a key (int) - output: returns true if decrypt process was - successful otherwise false - if key not passed the method uses the key by the constructor. - otherwise key = 1 - """ - - #precondition - assert (isinstance(file,str) and isinstance(key,int)) - - try: - with open(file,"r") as fin: - with open("decrypt.out","w+") as fout: - - # actual encrypt-process - for line in fin: - fout.write(self.decrypt_string(line,key)) - - except: - return False - - return True - - - - -# Tests -# crypt = XORCipher() -# key = 67 - -# # test enrcypt -# print crypt.encrypt("hallo welt",key) -# # test decrypt -# print crypt.decrypt(crypt.encrypt("hallo welt",key), key) - -# # test encrypt_string -# print crypt.encrypt_string("hallo welt",key) - -# # test decrypt_string -# print crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key) - -# if (crypt.encrypt_file("test.txt",key)): -# print "encrypt successful" -# else: -# print "encrypt unsuccessful" - -# if (crypt.decrypt_file("encrypt.out",key)): -# print "decrypt successful" -# else: -# print "decrypt unsuccessful" \ No newline at end of file diff --git a/ciphers/brute-force_caesar_cipher.py b/ciphers/brute-force_caesar_cipher.py deleted file mode 100644 index 8582249c8..000000000 --- a/ciphers/brute-force_caesar_cipher.py +++ /dev/null @@ -1,54 +0,0 @@ -from __future__ import print_function -def decrypt(message): - """ - >>> decrypt('TMDETUX PMDVU') - Decryption using Key #0: TMDETUX PMDVU - Decryption using Key #1: SLCDSTW OLCUT - Decryption using Key #2: RKBCRSV NKBTS - Decryption using Key #3: QJABQRU MJASR - Decryption using Key #4: PIZAPQT LIZRQ - Decryption using Key #5: OHYZOPS KHYQP - Decryption using Key #6: NGXYNOR JGXPO - Decryption using Key #7: MFWXMNQ IFWON - Decryption using Key #8: LEVWLMP HEVNM - Decryption using Key #9: KDUVKLO GDUML - Decryption using Key #10: JCTUJKN FCTLK - Decryption using Key #11: IBSTIJM EBSKJ - Decryption using Key #12: HARSHIL DARJI - Decryption using Key #13: GZQRGHK CZQIH - Decryption using Key #14: FYPQFGJ BYPHG - Decryption using Key #15: EXOPEFI AXOGF - Decryption using Key #16: DWNODEH ZWNFE - Decryption using Key #17: CVMNCDG YVMED - Decryption using Key #18: BULMBCF XULDC - Decryption using Key #19: ATKLABE WTKCB - Decryption using Key #20: ZSJKZAD VSJBA - Decryption using Key #21: YRIJYZC URIAZ - Decryption using Key #22: XQHIXYB TQHZY - Decryption using Key #23: WPGHWXA SPGYX - Decryption using Key #24: VOFGVWZ ROFXW - Decryption using Key #25: UNEFUVY QNEWV - """ - LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - for key in range(len(LETTERS)): - translated = "" - for symbol in message: - if symbol in LETTERS: - num = LETTERS.find(symbol) - num = num - key - if num < 0: - num = num + len(LETTERS) - translated = translated + LETTERS[num] - else: - translated = translated + symbol - print("Decryption using Key #%s: %s" % (key, translated)) - -def main(): - message = raw_input("Encrypted message: ") - message = message.upper() - decrypt(message) - -if __name__ == '__main__': - import doctest - doctest.testmod() - main() diff --git a/ciphers/transposition_cipher_encrypt-decrypt_file.py b/ciphers/transposition_cipher_encrypt-decrypt_file.py deleted file mode 100644 index 5c3eaaca6..000000000 --- a/ciphers/transposition_cipher_encrypt-decrypt_file.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import print_function -import time, os, sys -import transposition_cipher as transCipher - -def main(): - inputFile = 'Prehistoric Men.txt' - outputFile = 'Output.txt' - key = int(raw_input('Enter key: ')) - mode = raw_input('Encrypt/Decrypt [e/d]: ') - - if not os.path.exists(inputFile): - print('File %s does not exist. Quitting...' % inputFile) - sys.exit() - if os.path.exists(outputFile): - print('Overwrite %s? [y/n]' % outputFile) - response = raw_input('> ') - if not response.lower().startswith('y'): - sys.exit() - - startTime = time.time() - if mode.lower().startswith('e'): - content = open(inputFile).read() - translated = transCipher.encryptMessage(key, content) - elif mode.lower().startswith('d'): - content = open(outputFile).read() - translated =transCipher .decryptMessage(key, content) - - outputObj = open(outputFile, 'w') - outputObj.write(translated) - outputObj.close() - - totalTime = round(time.time() - startTime, 2) - print(('Done (', totalTime, 'seconds )')) - -if __name__ == '__main__': - main() diff --git a/data_structures/AVL/AVL.py b/data_structures/AVL/AVL.py deleted file mode 100644 index d01e8f825..000000000 --- a/data_structures/AVL/AVL.py +++ /dev/null @@ -1,181 +0,0 @@ -""" -An AVL tree -""" -from __future__ import print_function - - -class Node: - - def __init__(self, label): - self.label = label - self._parent = None - self._left = None - self._right = None - self.height = 0 - - @property - def right(self): - return self._right - - @right.setter - def right(self, node): - if node is not None: - node._parent = self - self._right = node - - @property - def left(self): - return self._left - - @left.setter - def left(self, node): - if node is not None: - node._parent = self - self._left = node - - @property - def parent(self): - return self._parent - - @parent.setter - def parent(self, node): - if node is not None: - self._parent = node - self.height = self.parent.height + 1 - else: - self.height = 0 - - -class AVL: - - def __init__(self): - self.root = None - self.size = 0 - - def insert(self, value): - node = Node(value) - - if self.root is None: - self.root = node - self.root.height = 0 - self.size = 1 - else: - # Same as Binary Tree - dad_node = None - curr_node = self.root - - while True: - if curr_node is not None: - - dad_node = curr_node - - if node.label < curr_node.label: - curr_node = curr_node.left - else: - curr_node = curr_node.right - else: - node.height = dad_node.height - dad_node.height += 1 - if node.label < dad_node.label: - dad_node.left = node - else: - dad_node.right = node - self.rebalance(node) - self.size += 1 - break - - def rebalance(self, node): - n = node - - while n is not None: - height_right = n.height - height_left = n.height - - if n.right is not None: - height_right = n.right.height - - if n.left is not None: - height_left = n.left.height - - if abs(height_left - height_right) > 1: - if height_left > height_right: - left_child = n.left - if left_child is not None: - h_right = (left_child.right.height - if (left_child.right is not None) else 0) - h_left = (left_child.left.height - if (left_child.left is not None) else 0) - if (h_left > h_right): - self.rotate_left(n) - break - else: - self.double_rotate_right(n) - break - else: - right_child = n.right - if right_child is not None: - h_right = (right_child.right.height - if (right_child.right is not None) else 0) - h_left = (right_child.left.height - if (right_child.left is not None) else 0) - if (h_left > h_right): - self.double_rotate_left(n) - break - else: - self.rotate_right(n) - break - n = n.parent - - def rotate_left(self, node): - aux = node.parent.label - node.parent.label = node.label - node.parent.right = Node(aux) - node.parent.right.height = node.parent.height + 1 - node.parent.left = node.right - - - def rotate_right(self, node): - aux = node.parent.label - node.parent.label = node.label - node.parent.left = Node(aux) - node.parent.left.height = node.parent.height + 1 - node.parent.right = node.right - - def double_rotate_left(self, node): - self.rotate_right(node.getRight().getRight()) - self.rotate_left(node) - - def double_rotate_right(self, node): - self.rotate_left(node.getLeft().getLeft()) - self.rotate_right(node) - - def empty(self): - if self.root is None: - return True - return False - - def preShow(self, curr_node): - if curr_node is not None: - self.preShow(curr_node.left) - print(curr_node.label, end=" ") - self.preShow(curr_node.right) - - def preorder(self, curr_node): - if curr_node is not None: - self.preShow(curr_node.left) - self.preShow(curr_node.right) - print(curr_node.label, end=" ") - - def getRoot(self): - return self.root - -t = AVL() -t.insert(1) -t.insert(2) -t.insert(3) -# t.preShow(t.root) -# print("\n") -# t.insert(4) -# t.insert(5) -# t.preShow(t.root) -# t.preorden(t.root) diff --git a/data_structures/Arrays.py b/data_structures/Arrays.py deleted file mode 100644 index 3ec9f8976..000000000 --- a/data_structures/Arrays.py +++ /dev/null @@ -1,3 +0,0 @@ -arr = [10, 20, 30, 40] -arr[1] = 30 -print(arr) diff --git a/data_structures/Binary Tree/FenwickTree.py b/data_structures/Binary Tree/FenwickTree.py deleted file mode 100644 index f429161c8..000000000 --- a/data_structures/Binary Tree/FenwickTree.py +++ /dev/null @@ -1,29 +0,0 @@ -from __future__ import print_function -class FenwickTree: - - def __init__(self, SIZE): # create fenwick tree with size SIZE - self.Size = SIZE - self.ft = [0 for i in range (0,SIZE)] - - def update(self, i, val): # update data (adding) in index i in O(lg N) - while (i < self.Size): - self.ft[i] += val - i += i & (-i) - - def query(self, i): # query cumulative data from index 0 to i in O(lg N) - ret = 0 - while (i > 0): - ret += self.ft[i] - i -= i & (-i) - return ret - -if __name__ == '__main__': - f = FenwickTree(100) - f.update(1,20) - f.update(4,4) - print (f.query(1)) - print (f.query(3)) - print (f.query(4)) - f.update(2,-5) - print (f.query(1)) - print (f.query(3)) diff --git a/data_structures/Binary Tree/LazySegmentTree.py b/data_structures/Binary Tree/LazySegmentTree.py deleted file mode 100644 index 9b14b24e8..000000000 --- a/data_structures/Binary Tree/LazySegmentTree.py +++ /dev/null @@ -1,91 +0,0 @@ -from __future__ import print_function -import math - -class SegmentTree: - - def __init__(self, N): - self.N = N - self.st = [0 for i in range(0,4*N)] # approximate the overall size of segment tree with array N - self.lazy = [0 for i in range(0,4*N)] # create array to store lazy update - self.flag = [0 for i in range(0,4*N)] # flag for lazy update - - def left(self, idx): - return idx*2 - - def right(self, idx): - return idx*2 + 1 - - def build(self, idx, l, r, A): - if l==r: - self.st[idx] = A[l-1] - else : - mid = (l+r)//2 - self.build(self.left(idx),l,mid, A) - self.build(self.right(idx),mid+1,r, A) - self.st[idx] = max(self.st[self.left(idx)] , self.st[self.right(idx)]) - - # update with O(lg N) (Normal segment tree without lazy update will take O(Nlg N) for each update) - def update(self, idx, l, r, a, b, val): # update(1, 1, N, a, b, v) for update val v to [a,b] - if self.flag[idx] == True: - self.st[idx] = self.lazy[idx] - self.flag[idx] = False - if l!=r: - self.lazy[self.left(idx)] = self.lazy[idx] - self.lazy[self.right(idx)] = self.lazy[idx] - self.flag[self.left(idx)] = True - self.flag[self.right(idx)] = True - - if r < a or l > b: - return True - if l >= a and r <= b : - self.st[idx] = val - if l!=r: - self.lazy[self.left(idx)] = val - self.lazy[self.right(idx)] = val - self.flag[self.left(idx)] = True - self.flag[self.right(idx)] = True - return True - mid = (l+r)//2 - self.update(self.left(idx),l,mid,a,b,val) - self.update(self.right(idx),mid+1,r,a,b,val) - self.st[idx] = max(self.st[self.left(idx)] , self.st[self.right(idx)]) - return True - - # query with O(lg N) - def query(self, idx, l, r, a, b): #query(1, 1, N, a, b) for query max of [a,b] - if self.flag[idx] == True: - self.st[idx] = self.lazy[idx] - self.flag[idx] = False - if l != r: - self.lazy[self.left(idx)] = self.lazy[idx] - self.lazy[self.right(idx)] = self.lazy[idx] - self.flag[self.left(idx)] = True - self.flag[self.right(idx)] = True - if r < a or l > b: - return -math.inf - if l >= a and r <= b: - return self.st[idx] - mid = (l+r)//2 - q1 = self.query(self.left(idx),l,mid,a,b) - q2 = self.query(self.right(idx),mid+1,r,a,b) - return max(q1,q2) - - def showData(self): - showList = [] - for i in range(1,N+1): - showList += [self.query(1, 1, self.N, i, i)] - print (showList) - - -if __name__ == '__main__': - A = [1,2,-4,7,3,-5,6,11,-20,9,14,15,5,2,-8] - N = 15 - segt = SegmentTree(N) - segt.build(1,1,N,A) - print (segt.query(1,1,N,4,6)) - print (segt.query(1,1,N,7,11)) - print (segt.query(1,1,N,7,12)) - segt.update(1,1,N,1,3,111) - print (segt.query(1,1,N,1,15)) - segt.update(1,1,N,7,8,235) - segt.showData() diff --git a/data_structures/Binary Tree/SegmentTree.py b/data_structures/Binary Tree/SegmentTree.py deleted file mode 100644 index 001bf999f..000000000 --- a/data_structures/Binary Tree/SegmentTree.py +++ /dev/null @@ -1,71 +0,0 @@ -from __future__ import print_function -import math - -class SegmentTree: - - def __init__(self, A): - self.N = len(A) - self.st = [0] * (4 * self.N) # approximate the overall size of segment tree with array N - self.build(1, 0, self.N - 1) - - def left(self, idx): - return idx * 2 - - def right(self, idx): - return idx * 2 + 1 - - def build(self, idx, l, r): - if l == r: - self.st[idx] = A[l] - else: - mid = (l + r) // 2 - self.build(self.left(idx), l, mid) - self.build(self.right(idx), mid + 1, r) - self.st[idx] = max(self.st[self.left(idx)] , self.st[self.right(idx)]) - - def update(self, a, b, val): - return self.update_recursive(1, 0, self.N - 1, a - 1, b - 1, val) - - def update_recursive(self, idx, l, r, a, b, val): # update(1, 1, N, a, b, v) for update val v to [a,b] - if r < a or l > b: - return True - if l == r : - self.st[idx] = val - return True - mid = (l+r)//2 - self.update_recursive(self.left(idx), l, mid, a, b, val) - self.update_recursive(self.right(idx), mid+1, r, a, b, val) - self.st[idx] = max(self.st[self.left(idx)] , self.st[self.right(idx)]) - return True - - def query(self, a, b): - return self.query_recursive(1, 0, self.N - 1, a - 1, b - 1) - - def query_recursive(self, idx, l, r, a, b): #query(1, 1, N, a, b) for query max of [a,b] - if r < a or l > b: - return -math.inf - if l >= a and r <= b: - return self.st[idx] - mid = (l+r)//2 - q1 = self.query_recursive(self.left(idx), l, mid, a, b) - q2 = self.query_recursive(self.right(idx), mid + 1, r, a, b) - return max(q1, q2) - - def showData(self): - showList = [] - for i in range(1,N+1): - showList += [self.query(i, i)] - print (showList) - - -if __name__ == '__main__': - A = [1,2,-4,7,3,-5,6,11,-20,9,14,15,5,2,-8] - N = 15 - segt = SegmentTree(A) - print (segt.query(4, 6)) - print (segt.query(7, 11)) - print (segt.query(7, 12)) - segt.update(1,3,111) - print (segt.query(1, 15)) - segt.update(7,8,235) - segt.showData() diff --git a/data_structures/Binary Tree/binary_search_tree.py b/data_structures/Binary Tree/binary_search_tree.py deleted file mode 100644 index b4021e4f8..000000000 --- a/data_structures/Binary Tree/binary_search_tree.py +++ /dev/null @@ -1,258 +0,0 @@ -''' -A binary search Tree -''' -from __future__ import print_function -class Node: - - def __init__(self, label, parent): - self.label = label - self.left = None - self.right = None - #Added in order to delete a node easier - self.parent = parent - - def getLabel(self): - return self.label - - def setLabel(self, label): - self.label = label - - def getLeft(self): - return self.left - - def setLeft(self, left): - self.left = left - - def getRight(self): - return self.right - - def setRight(self, right): - self.right = right - - def getParent(self): - return self.parent - - def setParent(self, parent): - self.parent = parent - -class BinarySearchTree: - - def __init__(self): - self.root = None - - def insert(self, label): - # Create a new Node - new_node = Node(label, None) - # If Tree is empty - if self.empty(): - self.root = new_node - else: - #If Tree is not empty - curr_node = self.root - #While we don't get to a leaf - while curr_node is not None: - #We keep reference of the parent node - parent_node = curr_node - #If node label is less than current node - if new_node.getLabel() < curr_node.getLabel(): - #We go left - curr_node = curr_node.getLeft() - else: - #Else we go right - curr_node = curr_node.getRight() - #We insert the new node in a leaf - if new_node.getLabel() < parent_node.getLabel(): - parent_node.setLeft(new_node) - else: - parent_node.setRight(new_node) - #Set parent to the new node - new_node.setParent(parent_node) - - def delete(self, label): - if (not self.empty()): - #Look for the node with that label - node = self.getNode(label) - #If the node exists - if(node is not None): - #If it has no children - if(node.getLeft() is None and node.getRight() is None): - self.__reassignNodes(node, None) - node = None - #Has only right children - elif(node.getLeft() is None and node.getRight() is not None): - self.__reassignNodes(node, node.getRight()) - #Has only left children - elif(node.getLeft() is not None and node.getRight() is None): - self.__reassignNodes(node, node.getLeft()) - #Has two children - else: - #Gets the max value of the left branch - tmpNode = self.getMax(node.getLeft()) - #Deletes the tmpNode - self.delete(tmpNode.getLabel()) - #Assigns the value to the node to delete and keesp tree structure - node.setLabel(tmpNode.getLabel()) - - def getNode(self, label): - curr_node = None - #If the tree is not empty - if(not self.empty()): - #Get tree root - curr_node = self.getRoot() - #While we don't find the node we look for - #I am using lazy evaluation here to avoid NoneType Attribute error - while curr_node is not None and curr_node.getLabel() is not label: - #If node label is less than current node - if label < curr_node.getLabel(): - #We go left - curr_node = curr_node.getLeft() - else: - #Else we go right - curr_node = curr_node.getRight() - return curr_node - - def getMax(self, root = None): - if(root is not None): - curr_node = root - else: - #We go deep on the right branch - curr_node = self.getRoot() - if(not self.empty()): - while(curr_node.getRight() is not None): - curr_node = curr_node.getRight() - return curr_node - - def getMin(self, root = None): - if(root is not None): - curr_node = root - else: - #We go deep on the left branch - curr_node = self.getRoot() - if(not self.empty()): - curr_node = self.getRoot() - while(curr_node.getLeft() is not None): - curr_node = curr_node.getLeft() - return curr_node - - def empty(self): - if self.root is None: - return True - return False - - def __InOrderTraversal(self, curr_node): - nodeList = [] - if curr_node is not None: - nodeList.insert(0, curr_node) - nodeList = nodeList + self.__InOrderTraversal(curr_node.getLeft()) - nodeList = nodeList + self.__InOrderTraversal(curr_node.getRight()) - return nodeList - - def getRoot(self): - return self.root - - def __isRightChildren(self, node): - if(node == node.getParent().getRight()): - return True - return False - - def __reassignNodes(self, node, newChildren): - if(newChildren is not None): - newChildren.setParent(node.getParent()) - if(node.getParent() is not None): - #If it is the Right Children - if(self.__isRightChildren(node)): - node.getParent().setRight(newChildren) - else: - #Else it is the left children - node.getParent().setLeft(newChildren) - - #This function traversal the tree. By default it returns an - #In order traversal list. You can pass a function to traversal - #The tree as needed by client code - def traversalTree(self, traversalFunction = None, root = None): - if(traversalFunction is None): - #Returns a list of nodes in preOrder by default - return self.__InOrderTraversal(self.root) - else: - #Returns a list of nodes in the order that the users wants to - return traversalFunction(self.root) - - #Returns an string of all the nodes labels in the list - #In Order Traversal - def __str__(self): - list = self.__InOrderTraversal(self.root) - str = "" - for x in list: - str = str + " " + x.getLabel().__str__() - return str - -def InPreOrder(curr_node): - nodeList = [] - if curr_node is not None: - nodeList = nodeList + InPreOrder(curr_node.getLeft()) - nodeList.insert(0, curr_node.getLabel()) - nodeList = nodeList + InPreOrder(curr_node.getRight()) - return nodeList - -def testBinarySearchTree(): - ''' - Example - 8 - / \ - 3 10 - / \ \ - 1 6 14 - / \ / - 4 7 13 - ''' - - ''' - Example After Deletion - 7 - / \ - 1 4 - - ''' - t = BinarySearchTree() - t.insert(8) - t.insert(3) - t.insert(6) - t.insert(1) - t.insert(10) - t.insert(14) - t.insert(13) - t.insert(4) - t.insert(7) - - #Prints all the elements of the list in order traversal - print(t.__str__()) - - if(t.getNode(6) is not None): - print("The label 6 exists") - else: - print("The label 6 doesn't exist") - - if(t.getNode(-1) is not None): - print("The label -1 exists") - else: - print("The label -1 doesn't exist") - - if(not t.empty()): - print(("Max Value: ", t.getMax().getLabel())) - print(("Min Value: ", t.getMin().getLabel())) - - t.delete(13) - t.delete(10) - t.delete(8) - t.delete(3) - t.delete(6) - t.delete(14) - - #Gets all the elements of the tree In pre order - #And it prints them - list = t.traversalTree(InPreOrder, t.root) - for x in list: - print(x) - -if __name__ == "__main__": - testBinarySearchTree() diff --git a/data_structures/Graph/BellmanFord.py b/data_structures/Graph/BellmanFord.py deleted file mode 100644 index f5e1ac983..000000000 --- a/data_structures/Graph/BellmanFord.py +++ /dev/null @@ -1,54 +0,0 @@ -from __future__ import print_function - -def printDist(dist, V): - print("\nVertex Distance") - for i in range(V): - if dist[i] != float('inf') : - print(i,"\t",int(dist[i]),end = "\t") - else: - print(i,"\t","INF",end="\t") - print() - -def BellmanFord(graph, V, E, src): - mdist=[float('inf') for i in range(V)] - mdist[src] = 0.0 - - for i in range(V-1): - for j in range(V): - u = graph[j]["src"] - v = graph[j]["dst"] - w = graph[j]["weight"] - - if mdist[u] != float('inf') and mdist[u] + w < mdist[v]: - mdist[v] = mdist[u] + w - for j in range(V): - u = graph[j]["src"] - v = graph[j]["dst"] - w = graph[j]["weight"] - - if mdist[u] != float('inf') and mdist[u] + w < mdist[v]: - print("Negative cycle found. Solution not possible.") - return - - printDist(mdist, V) - - - -#MAIN -V = int(raw_input("Enter number of vertices: ")) -E = int(raw_input("Enter number of edges: ")) - -graph = [dict() for j in range(E)] - -for i in range(V): - graph[i][i] = 0.0 - -for i in range(E): - print("\nEdge ",i+1) - src = int(raw_input("Enter source:")) - dst = int(raw_input("Enter destination:")) - weight = float(raw_input("Enter weight:")) - graph[i] = {"src": src,"dst": dst, "weight": weight} - -gsrc = int(raw_input("\nEnter shortest path source:")) -BellmanFord(graph, V, E, gsrc) diff --git a/data_structures/Graph/BreadthFirstSearch.py b/data_structures/Graph/BreadthFirstSearch.py deleted file mode 100644 index 3992e2d4d..000000000 --- a/data_structures/Graph/BreadthFirstSearch.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/python -# encoding=utf8 - -""" Author: OMKAR PATHAK """ - -from __future__ import print_function - - -class Graph(): - def __init__(self): - self.vertex = {} - - # for printing the Graph vertexes - def printGraph(self): - for i in self.vertex.keys(): - print(i,' -> ', ' -> '.join([str(j) for j in self.vertex[i]])) - - # for adding the edge beween two vertexes - def addEdge(self, fromVertex, toVertex): - # check if vertex is already present, - if fromVertex in self.vertex.keys(): - self.vertex[fromVertex].append(toVertex) - else: - # else make a new vertex - self.vertex[fromVertex] = [toVertex] - - def BFS(self, startVertex): - # Take a list for stoting already visited vertexes - visited = [False] * len(self.vertex) - - # create a list to store all the vertexes for BFS - queue = [] - - # mark the source node as visited and enqueue it - visited[startVertex] = True - queue.append(startVertex) - - while queue: - startVertex = queue.pop(0) - print(startVertex, end = ' ') - - # mark all adjacent nodes as visited and print them - for i in self.vertex[startVertex]: - if visited[i] == False: - queue.append(i) - visited[i] = True - -if __name__ == '__main__': - g = Graph() - g.addEdge(0, 1) - g.addEdge(0, 2) - g.addEdge(1, 2) - g.addEdge(2, 0) - g.addEdge(2, 3) - g.addEdge(3, 3) - - g.printGraph() - print('BFS:') - g.BFS(2) - - # OUTPUT: - # 0  ->  1 -> 2 - # 1  ->  2 - # 2  ->  0 -> 3 - # 3  ->  3 - # BFS: - # 2 0 3 1 diff --git a/data_structures/Graph/DepthFirstSearch.py b/data_structures/Graph/DepthFirstSearch.py deleted file mode 100644 index 98faf6135..000000000 --- a/data_structures/Graph/DepthFirstSearch.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/python -# encoding=utf8 - -""" Author: OMKAR PATHAK """ -from __future__ import print_function - - -class Graph(): - def __init__(self): - self.vertex = {} - - # for printing the Graph vertexes - def printGraph(self): - print(self.vertex) - for i in self.vertex.keys(): - print(i,' -> ', ' -> '.join([str(j) for j in self.vertex[i]])) - - # for adding the edge beween two vertexes - def addEdge(self, fromVertex, toVertex): - # check if vertex is already present, - if fromVertex in self.vertex.keys(): - self.vertex[fromVertex].append(toVertex) - else: - # else make a new vertex - self.vertex[fromVertex] = [toVertex] - - def DFS(self): - # visited array for storing already visited nodes - visited = [False] * len(self.vertex) - - # call the recursive helper function - for i in range(len(self.vertex)): - if visited[i] == False: - self.DFSRec(i, visited) - - def DFSRec(self, startVertex, visited): - # mark start vertex as visited - visited[startVertex] = True - - print(startVertex, end = ' ') - - # Recur for all the vertexes that are adjacent to this node - for i in self.vertex.keys(): - if visited[i] == False: - self.DFSRec(i, visited) - -if __name__ == '__main__': - g = Graph() - g.addEdge(0, 1) - g.addEdge(0, 2) - g.addEdge(1, 2) - g.addEdge(2, 0) - g.addEdge(2, 3) - g.addEdge(3, 3) - - g.printGraph() - print('DFS:') - g.DFS() - - # OUTPUT: - # 0  ->  1 -> 2 - # 1  ->  2 - # 2  ->  0 -> 3 - # 3  ->  3 - # DFS: - # 0 1 2 3 diff --git a/data_structures/Graph/Dijkstra.py b/data_structures/Graph/Dijkstra.py deleted file mode 100644 index 2580dd2f0..000000000 --- a/data_structures/Graph/Dijkstra.py +++ /dev/null @@ -1,57 +0,0 @@ -from __future__ import print_function - -def printDist(dist, V): - print("\nVertex Distance") - for i in range(V): - if dist[i] != float('inf') : - print(i,"\t",int(dist[i]),end = "\t") - else: - print(i,"\t","INF",end="\t") - print() - -def minDist(mdist, vset, V): - minVal = float('inf') - minInd = -1 - for i in range(V): - if (not vset[i]) and mdist[i] < minVal : - minInd = i - minVal = mdist[i] - return minInd - -def Dijkstra(graph, V, src): - mdist=[float('inf') for i in range(V)] - vset = [False for i in range(V)] - mdist[src] = 0.0; - - for i in range(V-1): - u = minDist(mdist, vset, V) - vset[u] = True - - for v in range(V): - if (not vset[v]) and graph[u][v]!=float('inf') and mdist[u] + graph[u][v] < mdist[v]: - mdist[v] = mdist[u] + graph[u][v] - - - - printDist(mdist, V) - - - -#MAIN -V = int(raw_input("Enter number of vertices: ")) -E = int(raw_input("Enter number of edges: ")) - -graph = [[float('inf') for i in range(V)] for j in range(V)] - -for i in range(V): - graph[i][i] = 0.0 - -for i in range(E): - print("\nEdge ",i+1) - src = int(raw_input("Enter source:")) - dst = int(raw_input("Enter destination:")) - weight = float(raw_input("Enter weight:")) - graph[src][dst] = weight - -gsrc = int(raw_input("\nEnter shortest path source:")) -Dijkstra(graph, V, gsrc) diff --git a/data_structures/Graph/FloydWarshall.py b/data_structures/Graph/FloydWarshall.py deleted file mode 100644 index 64d41c2f8..000000000 --- a/data_structures/Graph/FloydWarshall.py +++ /dev/null @@ -1,48 +0,0 @@ -from __future__ import print_function - -def printDist(dist, V): - print("\nThe shortest path matrix using Floyd Warshall algorithm\n") - for i in range(V): - for j in range(V): - if dist[i][j] != float('inf') : - print(int(dist[i][j]),end = "\t") - else: - print("INF",end="\t") - print() - - - -def FloydWarshall(graph, V): - dist=[[float('inf') for i in range(V)] for j in range(V)] - - for i in range(V): - for j in range(V): - dist[i][j] = graph[i][j] - - for k in range(V): - for i in range(V): - for j in range(V): - if dist[i][k]!=float('inf') and dist[k][j]!=float('inf') and dist[i][k]+dist[k][j] < dist[i][j]: - dist[i][j] = dist[i][k] + dist[k][j] - - printDist(dist, V) - - - -#MAIN -V = int(raw_input("Enter number of vertices: ")) -E = int(raw_input("Enter number of edges: ")) - -graph = [[float('inf') for i in range(V)] for j in range(V)] - -for i in range(V): - graph[i][i] = 0.0 - -for i in range(E): - print("\nEdge ",i+1) - src = int(raw_input("Enter source:")) - dst = int(raw_input("Enter destination:")) - weight = float(raw_input("Enter weight:")) - graph[src][dst] = weight - -FloydWarshall(graph, V) diff --git a/data_structures/Graph/Graph.py b/data_structures/Graph/Graph.py deleted file mode 100644 index 9bd61559d..000000000 --- a/data_structures/Graph/Graph.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/python -# encoding=utf8 - -from __future__ import print_function -# Author: OMKAR PATHAK - -# We can use Python's dictionary for constructing the graph - -class AdjacencyList(object): - def __init__(self): - self.List = {} - - def addEdge(self, fromVertex, toVertex): - # check if vertex is already present - if fromVertex in self.List.keys(): - self.List[fromVertex].append(toVertex) - else: - self.List[fromVertex] = [toVertex] - - def printList(self): - for i in self.List: - print((i,'->',' -> '.join([str(j) for j in self.List[i]]))) - -if __name__ == '__main__': - al = AdjacencyList() - al.addEdge(0, 1) - al.addEdge(0, 4) - al.addEdge(4, 1) - al.addEdge(4, 3) - al.addEdge(1, 0) - al.addEdge(1, 4) - al.addEdge(1, 3) - al.addEdge(1, 2) - al.addEdge(2, 3) - al.addEdge(3, 4) - - al.printList() - - # OUTPUT: - # 0 -> 1 -> 4 - # 1 -> 0 -> 4 -> 3 -> 2 - # 2 -> 3 - # 3 -> 4 - # 4 -> 1 -> 3 diff --git a/data_structures/Graph/Graph_list.py b/data_structures/Graph/Graph_list.py deleted file mode 100644 index d67bc96c4..000000000 --- a/data_structures/Graph/Graph_list.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import print_function - - -class Graph: - def __init__(self, vertex): - self.vertex = vertex - self.graph = [[0] for i in range(vertex)] - - def add_edge(self, u, v): - self.graph[u - 1].append(v - 1) - - def show(self): - for i in range(self.vertex): - print('%d: '% (i + 1), end=' ') - for j in self.graph[i]: - print('%d-> '% (j + 1), end=' ') - print(' ') - - - -g = Graph(100) - -g.add_edge(1,3) -g.add_edge(2,3) -g.add_edge(3,4) -g.add_edge(3,5) -g.add_edge(4,5) - - -g.show() - diff --git a/data_structures/Graph/Graph_matrix.py b/data_structures/Graph/Graph_matrix.py deleted file mode 100644 index de25301d6..000000000 --- a/data_structures/Graph/Graph_matrix.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import print_function - - -class Graph: - - def __init__(self, vertex): - self.vertex = vertex - self.graph = [[0] * vertex for i in range(vertex) ] - - def add_edge(self, u, v): - self.graph[u - 1][v - 1] = 1 - self.graph[v - 1][u - 1] = 1 - - def show(self): - - for i in self.graph: - for j in i: - print(j, end=' ') - print(' ') - - - - -g = Graph(100) - -g.add_edge(1,4) -g.add_edge(4,2) -g.add_edge(4,5) -g.add_edge(2,5) -g.add_edge(5,3) -g.show() - diff --git a/data_structures/Graph/dijkstra_algorithm.py b/data_structures/Graph/dijkstra_algorithm.py deleted file mode 100644 index 985c7f6c1..000000000 --- a/data_structures/Graph/dijkstra_algorithm.py +++ /dev/null @@ -1,212 +0,0 @@ -# Title: Dijkstra's Algorithm for finding single source shortest path from scratch -# Author: Shubham Malik -# References: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm - -from __future__ import print_function -import math -import sys -# For storing the vertex set to retreive node with the lowest distance - - -class PriorityQueue: - # Based on Min Heap - def __init__(self): - self.cur_size = 0 - self.array = [] - self.pos = {} # To store the pos of node in array - - def isEmpty(self): - return self.cur_size == 0 - - def min_heapify(self, idx): - lc = self.left(idx) - rc = self.right(idx) - if lc < self.cur_size and self.array(lc)[0] < self.array(idx)[0]: - smallest = lc - else: - smallest = idx - if rc < self.cur_size and self.array(rc)[0] < self.array(smallest)[0]: - smallest = rc - if smallest != idx: - self.swap(idx, smallest) - self.min_heapify(smallest) - - def insert(self, tup): - # Inserts a node into the Priority Queue - self.pos[tup[1]] = self.cur_size - self.cur_size += 1 - self.array.append((sys.maxsize, tup[1])) - self.decrease_key((sys.maxsize, tup[1]), tup[0]) - - def extract_min(self): - # Removes and returns the min element at top of priority queue - min_node = self.array[0][1] - self.array[0] = self.array[self.cur_size - 1] - self.cur_size -= 1 - self.min_heapify(1) - del self.pos[min_node] - return min_node - - def left(self, i): - # returns the index of left child - return 2 * i + 1 - - def right(self, i): - # returns the index of right child - return 2 * i + 2 - - def par(self, i): - # returns the index of parent - return math.floor(i / 2) - - def swap(self, i, j): - # swaps array elements at indices i and j - # update the pos{} - self.pos[self.array[i][1]] = j - self.pos[self.array[j][1]] = i - temp = self.array[i] - self.array[i] = self.array[j] - self.array[j] = temp - - def decrease_key(self, tup, new_d): - idx = self.pos[tup[1]] - # assuming the new_d is atmost old_d - self.array[idx] = (new_d, tup[1]) - while idx > 0 and self.array[self.par(idx)][0] > self.array[idx][0]: - self.swap(idx, self.par(idx)) - idx = self.par(idx) - - -class Graph: - def __init__(self, num): - self.adjList = {} # To store graph: u -> (v,w) - self.num_nodes = num # Number of nodes in graph - # To store the distance from source vertex - self.dist = [0] * self.num_nodes - self.par = [-1] * self.num_nodes # To store the path - - def add_edge(self, u, v, w): - # Edge going from node u to v and v to u with weight w - # u (w)-> v, v (w) -> u - # Check if u already in graph - if u in self.adjList.keys(): - self.adjList[u].append((v, w)) - else: - self.adjList[u] = [(v, w)] - - # Assuming undirected graph - if v in self.adjList.keys(): - self.adjList[v].append((u, w)) - else: - self.adjList[v] = [(u, w)] - - def show_graph(self): - # u -> v(w) - for u in self.adjList: - print(u, '->', ' -> '.join(str("{}({})".format(v, w)) - for v, w in self.adjList[u])) - - def dijkstra(self, src): - # Flush old junk values in par[] - self.par = [-1] * self.num_nodes - # src is the source node - self.dist[src] = 0 - Q = PriorityQueue() - Q.insert((0, src)) # (dist from src, node) - for u in self.adjList.keys(): - if u != src: - self.dist[u] = sys.maxsize # Infinity - self.par[u] = -1 - - while not Q.isEmpty(): - u = Q.extract_min() # Returns node with the min dist from source - # Update the distance of all the neighbours of u and - # if their prev dist was INFINITY then push them in Q - for v, w in self.adjList[u]: - new_dist = self.dist[u] + w - if self.dist[v] > new_dist: - if self.dist[v] == sys.maxsize: - Q.insert((new_dist, v)) - else: - Q.decrease_key((self.dist[v], v), new_dist) - self.dist[v] = new_dist - self.par[v] = u - - # Show the shortest distances from src - self.show_distances(src) - - def show_distances(self, src): - print("Distance from node: {}".format(src)) - for u in range(self.num_nodes): - print('Node {} has distance: {}'.format(u, self.dist[u])) - - def show_path(self, src, dest): - # To show the shortest path from src to dest - # WARNING: Use it *after* calling dijkstra - path = [] - cost = 0 - temp = dest - # Backtracking from dest to src - while self.par[temp] != -1: - path.append(temp) - if temp != src: - for v, w in self.adjList[temp]: - if v == self.par[temp]: - cost += w - break - temp = self.par[temp] - path.append(src) - path.reverse() - - print('----Path to reach {} from {}----'.format(dest, src)) - for u in path: - print('{}'.format(u), end=' ') - if u != dest: - print('-> ', end='') - - print('\nTotal cost of path: ', cost) - - -if __name__ == '__main__': - graph = Graph(9) - graph.add_edge(0, 1, 4) - graph.add_edge(0, 7, 8) - graph.add_edge(1, 2, 8) - graph.add_edge(1, 7, 11) - graph.add_edge(2, 3, 7) - graph.add_edge(2, 8, 2) - graph.add_edge(2, 5, 4) - graph.add_edge(3, 4, 9) - graph.add_edge(3, 5, 14) - graph.add_edge(4, 5, 10) - graph.add_edge(5, 6, 2) - graph.add_edge(6, 7, 1) - graph.add_edge(6, 8, 6) - graph.add_edge(7, 8, 7) - graph.show_graph() - graph.dijkstra(0) - graph.show_path(0, 4) - -# OUTPUT -# 0 -> 1(4) -> 7(8) -# 1 -> 0(4) -> 2(8) -> 7(11) -# 7 -> 0(8) -> 1(11) -> 6(1) -> 8(7) -# 2 -> 1(8) -> 3(7) -> 8(2) -> 5(4) -# 3 -> 2(7) -> 4(9) -> 5(14) -# 8 -> 2(2) -> 6(6) -> 7(7) -# 5 -> 2(4) -> 3(14) -> 4(10) -> 6(2) -# 4 -> 3(9) -> 5(10) -# 6 -> 5(2) -> 7(1) -> 8(6) -# Distance from node: 0 -# Node 0 has distance: 0 -# Node 1 has distance: 4 -# Node 2 has distance: 12 -# Node 3 has distance: 19 -# Node 4 has distance: 21 -# Node 5 has distance: 11 -# Node 6 has distance: 9 -# Node 7 has distance: 8 -# Node 8 has distance: 14 -# ----Path to reach 4 from 0---- -# 0 -> 7 -> 6 -> 5 -> 4 -# Total cost of path: 21 diff --git a/data_structures/Graph/even_tree.py b/data_structures/Graph/even_tree.py deleted file mode 100644 index 9383ea9a1..000000000 --- a/data_structures/Graph/even_tree.py +++ /dev/null @@ -1,70 +0,0 @@ -""" -You are given a tree(a simple connected graph with no cycles). The tree has N -nodes numbered from 1 to N and is rooted at node 1. - -Find the maximum number of edges you can remove from the tree to get a forest -such that each connected component of the forest contains an even number of -nodes. - -Constraints -2 <= 2 <= 100 - -Note: The tree input will be such that it can always be decomposed into -components containing an even number of nodes. -""" -from __future__ import print_function -# pylint: disable=invalid-name -from collections import defaultdict - - -def dfs(start): - """DFS traversal""" - # pylint: disable=redefined-outer-name - ret = 1 - visited[start] = True - for v in tree.get(start): - if v not in visited: - ret += dfs(v) - if ret % 2 == 0: - cuts.append(start) - return ret - - -def even_tree(): - """ - 2 1 - 3 1 - 4 3 - 5 2 - 6 1 - 7 2 - 8 6 - 9 8 - 10 8 - On removing edges (1,3) and (1,6), we can get the desired result 2. - """ - dfs(1) - - -if __name__ == '__main__': - n, m = 10, 9 - tree = defaultdict(list) - visited = {} - cuts = [] - count = 0 - edges = [ - (2, 1), - (3, 1), - (4, 3), - (5, 2), - (6, 1), - (7, 2), - (8, 6), - (9, 8), - (10, 8), - ] - for u, v in edges: - tree[u].append(v) - tree[v].append(u) - even_tree() - print(len(cuts) - 1) diff --git a/data_structures/Heap/heap.py b/data_structures/Heap/heap.py deleted file mode 100644 index d0c2400eb..000000000 --- a/data_structures/Heap/heap.py +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/python - -from __future__ import print_function, division - -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 - -class Heap: - def __init__(self): - self.h = [] - self.currsize = 0 - - def leftChild(self,i): - if 2*i+1 < self.currsize: - return 2*i+1 - return None - - def rightChild(self,i): - if 2*i+2 < self.currsize: - return 2*i+2 - return None - - def maxHeapify(self,node): - if node < self.currsize: - m = node - lc = self.leftChild(node) - rc = self.rightChild(node) - if lc is not None and self.h[lc] > self.h[m]: - m = lc - if rc is not None and self.h[rc] > self.h[m]: - m = rc - if m!=node: - temp = self.h[node] - self.h[node] = self.h[m] - self.h[m] = temp - self.maxHeapify(m) - - def buildHeap(self,a): - self.currsize = len(a) - self.h = list(a) - for i in range(self.currsize/2,-1,-1): - self.maxHeapify(i) - - def getMax(self): - if self.currsize >= 1: - me = self.h[0] - temp = self.h[0] - self.h[0] = self.h[self.currsize-1] - self.h[self.currsize-1] = temp - self.currsize -= 1 - self.maxHeapify(0) - return me - return None - - def heapSort(self): - size = self.currsize - while self.currsize-1 >= 0: - temp = self.h[0] - self.h[0] = self.h[self.currsize-1] - self.h[self.currsize-1] = temp - self.currsize -= 1 - self.maxHeapify(0) - self.currsize = size - - def insert(self,data): - self.h.append(data) - curr = self.currsize - self.currsize+=1 - while self.h[curr] > self.h[curr/2]: - temp = self.h[curr/2] - self.h[curr/2] = self.h[curr] - self.h[curr] = temp - curr = curr/2 - - def display(self): - print(self.h) - -def main(): - l = list(map(int, raw_input().split())) - h = Heap() - h.buildHeap(l) - h.heapSort() - h.display() - -if __name__=='__main__': - main() - - diff --git a/data_structures/LinkedList/DoublyLinkedList.py b/data_structures/LinkedList/DoublyLinkedList.py deleted file mode 100644 index 18eb63fea..000000000 --- a/data_structures/LinkedList/DoublyLinkedList.py +++ /dev/null @@ -1,76 +0,0 @@ -''' -- A linked list is similar to an array, it holds values. However, links in a linked list do not have indexes. -- This is an example of a double ended, doubly linked list. -- Each link references the next link and the previous one. -''' -from __future__ import print_function - - -class LinkedList: - def __init__(self): - self.head = None - self.tail = None - - def insertHead(self, x): - newLink = Link(x) #Create a new link with a value attached to it - if(self.isEmpty() == True): #Set the first element added to be the tail - self.tail = newLink - else: - self.head.previous = newLink # newLink <-- currenthead(head) - newLink.next = self.head # newLink <--> currenthead(head) - self.head = newLink # newLink(head) <--> oldhead - - def deleteHead(self): - temp = self.head - self.head = self.head.next # oldHead <--> 2ndElement(head) - self.head.previous = None # oldHead --> 2ndElement(head) nothing pointing at it so the old head will be removed - if(self.head is None): - self.tail = None - return temp - - def insertTail(self, x): - newLink = Link(x) - newLink.next = None # currentTail(tail) newLink --> - self.tail.next = newLink # currentTail(tail) --> newLink --> - newLink.previous = self.tail #currentTail(tail) <--> newLink --> - self.tail = newLink # oldTail <--> newLink(tail) --> - - def deleteTail(self): - temp = self.tail - self.tail = self.tail.previous # 2ndLast(tail) <--> oldTail --> None - self.tail.next = None # 2ndlast(tail) --> None - return temp - - def delete(self, x): - current = self.head - - while(current.value != x): # Find the position to delete - current = current.next - - if(current == self.head): - self.deleteHead() - - elif(current == self.tail): - self.deleteTail() - - else: #Before: 1 <--> 2(current) <--> 3 - current.previous.next = current.next # 1 --> 3 - current.next.previous = current.previous # 1 <--> 3 - - def isEmpty(self): #Will return True if the list is empty - return(self.head is None) - - def display(self): #Prints contents of the list - current = self.head - while(current != None): - current.displayLink() - current = current.next - print() - -class Link: - next = None #This points to the link in front of the new link - previous = None #This points to the link behind the new link - def __init__(self, x): - self.value = x - def displayLink(self): - print("{}".format(self.value), end=" ") diff --git a/data_structures/LinkedList/__init__.py b/data_structures/LinkedList/__init__.py deleted file mode 100644 index 6d50f23c1..000000000 --- a/data_structures/LinkedList/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -class Node: - def __init__(self, item, next): - self.item = item - self.next = next - -class LinkedList: - def __init__(self): - self.head = None - - def add(self, item): - self.head = Node(item, self.head) - - def remove(self): - if self.is_empty(): - return None - else: - item = self.head.item - self.head = self.head.next - return item - - def is_empty(self): - return self.head is None diff --git a/data_structures/LinkedList/singly_LinkedList.py b/data_structures/LinkedList/singly_LinkedList.py deleted file mode 100644 index 0d6157e3e..000000000 --- a/data_structures/LinkedList/singly_LinkedList.py +++ /dev/null @@ -1,70 +0,0 @@ -from __future__ import print_function - - -class Node: # create a Node - def __init__(self, data): - self.data = data # given data - self.next = None # given next to None - - -class Linked_List: - def insert_tail(Head, data): - if Head.next is None: - Head.next = Node(data) - else: - Head.next.insert_tail(data) - - def insert_head(Head, data): - tamp = Head - if tamp is None: - newNod = Node() # create a new Node - newNod.data = data - newNod.next = None - Head = newNod # make new node to Head - else: - newNod = Node() - newNod.data = data - newNod.next = Head # put the Head at NewNode Next - Head = newNod # make a NewNode to Head - return Head - - def printList(Head): # print every node data - tamp = Head - while tamp is not None: - print(tamp.data) - tamp = tamp.next - - def delete_head(Head): # delete from head - if Head is not None: - Head = Head.next - return Head # return new Head - - def delete_tail(Head): # delete from tail - if Head is not None: - tamp = Node() - tamp = Head - while tamp.next.next is not None: # find the 2nd last element - tamp = tamp.next - # delete the last element by give next None to 2nd last Element - tamp.next = None - return Head - - def isEmpty(Head): - return Head is None # Return if Head is none - - def reverse(Head): - prev = None - current = Head - - while current: - # Store the current node's next node. - next_node = current.next - # Make the current node's next point backwards - current.next = prev - # Make the previous node be the current node - prev = current - # Make the current node the next node (to progress iteration) - current = next_node - # Return prev in order to put the head at the end - Head = prev - return Head diff --git a/data_structures/Queue/DeQueue.py b/data_structures/Queue/DeQueue.py deleted file mode 100644 index fdee64eb6..000000000 --- a/data_structures/Queue/DeQueue.py +++ /dev/null @@ -1,40 +0,0 @@ -from __future__ import print_function -# Python code to demonstrate working of -# extend(), extendleft(), rotate(), reverse() - -# importing "collections" for deque operations -import collections - -# initializing deque -de = collections.deque([1, 2, 3,]) - -# using extend() to add numbers to right end -# adds 4,5,6 to right end -de.extend([4,5,6]) - -# printing modified deque -print ("The deque after extending deque at end is : ") -print (de) - -# using extendleft() to add numbers to left end -# adds 7,8,9 to right end -de.extendleft([7,8,9]) - -# printing modified deque -print ("The deque after extending deque at beginning is : ") -print (de) - -# using rotate() to rotate the deque -# rotates by 3 to left -de.rotate(-3) - -# printing modified deque -print ("The deque after rotating deque is : ") -print (de) - -# using reverse() to reverse the deque -de.reverse() - -# printing modified deque -print ("The deque after reversing deque is : ") -print (de) diff --git a/data_structures/Queue/QueueOnList.py b/data_structures/Queue/QueueOnList.py deleted file mode 100644 index c8d0b41de..000000000 --- a/data_structures/Queue/QueueOnList.py +++ /dev/null @@ -1,45 +0,0 @@ -"""Queue represented by a python list""" -class Queue(): - def __init__(self): - self.entries = [] - self.length = 0 - self.front=0 - - def __str__(self): - printed = '<' + str(self.entries)[1:-1] + '>' - return printed - - """Enqueues {@code item} - @param item - item to enqueue""" - def put(self, item): - self.entries.append(item) - self.length = self.length + 1 - - - """Dequeues {@code item} - @requirement: |self.length| > 0 - @return dequeued - item that was dequeued""" - def get(self): - self.length = self.length - 1 - dequeued = self.entries[self.front] - self.front-=1 - self.entries = self.entries[self.front:] - return dequeued - - """Rotates the queue {@code rotation} times - @param rotation - number of times to rotate queue""" - def rotate(self, rotation): - for i in range(rotation): - self.put(self.get()) - - """Enqueues {@code item} - @return item at front of self.entries""" - def front(self): - return self.entries[0] - - """Returns the length of this.entries""" - def size(self): - return self.length diff --git a/data_structures/Queue/QueueOnPseudoStack.py b/data_structures/Queue/QueueOnPseudoStack.py deleted file mode 100644 index b69fbcc98..000000000 --- a/data_structures/Queue/QueueOnPseudoStack.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Queue represented by a pseudo stack (represented by a list with pop and append)""" -class Queue(): - def __init__(self): - self.stack = [] - self.length = 0 - - def __str__(self): - printed = '<' + str(self.stack)[1:-1] + '>' - return printed - - """Enqueues {@code item} - @param item - item to enqueue""" - def put(self, item): - self.stack.append(item) - self.length = self.length + 1 - - """Dequeues {@code item} - @requirement: |self.length| > 0 - @return dequeued - item that was dequeued""" - def get(self): - self.rotate(1) - dequeued = self.stack[self.length-1] - self.stack = self.stack[:-1] - self.rotate(self.length-1) - self.length = self.length -1 - return dequeued - - """Rotates the queue {@code rotation} times - @param rotation - number of times to rotate queue""" - def rotate(self, rotation): - for i in range(rotation): - temp = self.stack[0] - self.stack = self.stack[1:] - self.put(temp) - self.length = self.length - 1 - - """Reports item at the front of self - @return item at front of self.stack""" - def front(self): - front = self.get() - self.put(front) - self.rotate(self.length-1) - return front - - """Returns the length of this.stack""" - def size(self): - return self.length diff --git a/data_structures/Queue/__init__.py b/data_structures/Queue/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/data_structures/Stacks/Stock-Span-Problem.py b/data_structures/Stacks/Stock-Span-Problem.py deleted file mode 100644 index 9628864ed..000000000 --- a/data_structures/Stacks/Stock-Span-Problem.py +++ /dev/null @@ -1,52 +0,0 @@ -''' -The stock span problem is a financial problem where we have a series of n daily -price quotes for a stock and we need to calculate span of stock's price for all n days. - -The span Si of the stock's price on a given day i is defined as the maximum -number of consecutive days just before the given day, for which the price of the stock -on the current day is less than or equal to its price on the given day. -''' -from __future__ import print_function -def calculateSpan(price, S): - - n = len(price) - # Create a stack and push index of fist element to it - st = [] - st.append(0) - - # Span value of first element is always 1 - S[0] = 1 - - # Calculate span values for rest of the elements - for i in range(1, n): - - # Pop elements from stack whlie stack is not - # empty and top of stack is smaller than price[i] - while( len(st) > 0 and price[st[0]] <= price[i]): - st.pop() - - # If stack becomes empty, then price[i] is greater - # than all elements on left of it, i.e. price[0], - # price[1], ..price[i-1]. Else the price[i] is - # greater than elements after top of stack - S[i] = i+1 if len(st) <= 0 else (i - st[0]) - - # Push this element to stack - st.append(i) - - -# A utility function to print elements of array -def printArray(arr, n): - for i in range(0,n): - print (arr[i],end =" ") - - -# Driver program to test above function -price = [10, 4, 5, 90, 120, 80] -S = [0 for i in range(len(price)+1)] - -# Fill the span values in array S[] -calculateSpan(price, S) - -# Print the calculated span values -printArray(S, len(price)) diff --git a/data_structures/Stacks/__init__.py b/data_structures/Stacks/__init__.py deleted file mode 100644 index f7e92ae2d..000000000 --- a/data_structures/Stacks/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -class Stack: - - def __init__(self): - self.stack = [] - self.top = 0 - - def is_empty(self): - return (self.top == 0) - - def push(self, item): - if self.top < len(self.stack): - self.stack[self.top] = item - else: - self.stack.append(item) - - self.top += 1 - - def pop(self): - if self.is_empty(): - return None - else: - self.top -= 1 - return self.stack[self.top] diff --git a/data_structures/Stacks/balanced_parentheses.py b/data_structures/Stacks/balanced_parentheses.py deleted file mode 100644 index 8d99358be..000000000 --- a/data_structures/Stacks/balanced_parentheses.py +++ /dev/null @@ -1,23 +0,0 @@ -from __future__ import print_function -from __future__ import absolute_import -from .Stack import Stack - -__author__ = 'Omkar Pathak' - - -def balanced_parentheses(parentheses): - """ Use a stack to check if a string of parentheses are balanced.""" - stack = Stack(len(parentheses)) - for parenthesis in parentheses: - if parenthesis == '(': - stack.push(parenthesis) - elif parenthesis == ')': - stack.pop() - return not stack.is_empty() - - -if __name__ == '__main__': - examples = ['((()))', '((())'] - print('Balanced parentheses demonstration:\n') - for example in examples: - print(example + ': ' + str(balanced_parentheses(example))) diff --git a/data_structures/Stacks/infix_to_postfix_conversion.py b/data_structures/Stacks/infix_to_postfix_conversion.py deleted file mode 100644 index 75211fed2..000000000 --- a/data_structures/Stacks/infix_to_postfix_conversion.py +++ /dev/null @@ -1,64 +0,0 @@ -from __future__ import print_function -from __future__ import absolute_import -import string - -from .Stack import Stack - -__author__ = 'Omkar Pathak' - - -def is_operand(char): - return char in string.ascii_letters or char in string.digits - - -def precedence(char): - """ Return integer value representing an operator's precedence, or - order of operation. - - https://en.wikipedia.org/wiki/Order_of_operations - """ - dictionary = {'+': 1, '-': 1, - '*': 2, '/': 2, - '^': 3} - return dictionary.get(char, -1) - - -def infix_to_postfix(expression): - """ Convert infix notation to postfix notation using the Shunting-yard - algorithm. - - https://en.wikipedia.org/wiki/Shunting-yard_algorithm - https://en.wikipedia.org/wiki/Infix_notation - https://en.wikipedia.org/wiki/Reverse_Polish_notation - """ - stack = Stack(len(expression)) - postfix = [] - for char in expression: - if is_operand(char): - postfix.append(char) - elif char not in {'(', ')'}: - while (not stack.is_empty() - and precedence(char) <= precedence(stack.peek())): - postfix.append(stack.pop()) - stack.push(char) - elif char == '(': - stack.push(char) - elif char == ')': - while not stack.is_empty() and stack.peek() != '(': - postfix.append(stack.pop()) - # Pop '(' from stack. If there is no '(', there is a mismatched - # parentheses. - if stack.peek() != '(': - raise ValueError('Mismatched parentheses') - stack.pop() - while not stack.is_empty(): - postfix.append(stack.pop()) - return ' '.join(postfix) - - -if __name__ == '__main__': - expression = 'a+b*(c^d-e)^(f+g*h)-i' - - print('Infix to Postfix Notation demonstration:\n') - print('Infix notation: ' + expression) - print('Postfix notation: ' + infix_to_postfix(expression)) diff --git a/data_structures/Stacks/next.py b/data_structures/Stacks/next.py deleted file mode 100644 index bca833395..000000000 --- a/data_structures/Stacks/next.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import print_function -# Function to print element and NGE pair for all elements of list -def printNGE(arr): - - for i in range(0, len(arr), 1): - - next = -1 - for j in range(i+1, len(arr), 1): - if arr[i] < arr[j]: - next = arr[j] - break - - print(str(arr[i]) + " -- " + str(next)) - -# Driver program to test above function -arr = [11,13,21,3] -printNGE(arr) diff --git a/data_structures/Stacks/stack.py b/data_structures/Stacks/stack.py deleted file mode 100644 index 66af8c025..000000000 --- a/data_structures/Stacks/stack.py +++ /dev/null @@ -1,69 +0,0 @@ -from __future__ import print_function -__author__ = 'Omkar Pathak' - - -class Stack(object): - """ A stack is an abstract data type that serves as a collection of - elements with two principal operations: push() and pop(). push() adds an - element to the top of the stack, and pop() removes an element from the top - of a stack. The order in which elements come off of a stack are - Last In, First Out (LIFO). - - https://en.wikipedia.org/wiki/Stack_(abstract_data_type) - """ - - def __init__(self, limit=10): - self.stack = [] - self.limit = limit - - def __bool__(self): - return not bool(self.stack) - - def __str__(self): - return str(self.stack) - - def push(self, data): - """ Push an element to the top of the stack.""" - if len(self.stack) >= self.limit: - raise StackOverflowError - self.stack.append(data) - - def pop(self): - """ Pop an element off of the top of the stack.""" - if self.stack: - return self.stack.pop() - else: - raise IndexError('pop from an empty stack') - - def peek(self): - """ Peek at the top-most element of the stack.""" - if self.stack: - return self.stack[-1] - - def is_empty(self): - """ Check if a stack is empty.""" - return not bool(self.stack) - - def size(self): - """ Return the size of the stack.""" - return len(self.stack) - - -class StackOverflowError(BaseException): - pass - - -if __name__ == '__main__': - stack = Stack() - for i in range(10): - stack.push(i) - - print('Stack demonstration:\n') - print('Initial stack: ' + str(stack)) - print('pop(): ' + str(stack.pop())) - print('After pop(), the stack is now: ' + str(stack)) - print('peek(): ' + str(stack.peek())) - stack.push(100) - print('After push(100), the stack is now: ' + str(stack)) - print('is_empty(): ' + str(stack.is_empty())) - print('size(): ' + str(stack.size())) diff --git a/data_structures/Trie/Trie.py b/data_structures/Trie/Trie.py deleted file mode 100644 index b6234c670..000000000 --- a/data_structures/Trie/Trie.py +++ /dev/null @@ -1,75 +0,0 @@ -""" -A Trie/Prefix Tree is a kind of search tree used to provide quick lookup -of words/patterns in a set of words. A basic Trie however has O(n^2) space complexity -making it impractical in practice. It however provides O(max(search_string, length of longest word)) lookup -time making it an optimal approach when space is not an issue. - -""" - - -class TrieNode: - def __init__(self): - self.nodes = dict() # Mapping from char to TrieNode - self.is_leaf = False - - def insert_many(self, words: [str]): # noqa: E999 This syntax is Python 3 only - """ - Inserts a list of words into the Trie - :param words: list of string words - :return: None - """ - for word in words: - self.insert(word) - - def insert(self, word: str): # noqa: E999 This syntax is Python 3 only - """ - Inserts a word into the Trie - :param word: word to be inserted - :return: None - """ - curr = self - for char in word: - if char not in curr.nodes: - curr.nodes[char] = TrieNode() - curr = curr.nodes[char] - curr.is_leaf = True - - def find(self, word: str) -> bool: # noqa: E999 This syntax is Python 3 only - """ - Tries to find word in a Trie - :param word: word to look for - :return: Returns True if word is found, False otherwise - """ - curr = self - for char in word: - if char not in curr.nodes: - return False - curr = curr.nodes[char] - return curr.is_leaf - - -def print_words(node: TrieNode, word: str): # noqa: E999 This syntax is Python 3 only - """ - Prints all the words in a Trie - :param node: root node of Trie - :param word: Word variable should be empty at start - :return: None - """ - if node.is_leaf: - print(word, end=' ') - - for key, value in node.nodes.items(): - print_words(value, word + key) - - -def test(): - words = ['banana', 'bananas', 'bandana', 'band', 'apple', 'all', 'beast'] - root = TrieNode() - root.insert_many(words) - # print_words(root, '') - assert root.find('banana') - assert not root.find('bandanas') - assert not root.find('apps') - assert root.find('apple') - -test() diff --git a/data_structures/UnionFind/__init__.py b/data_structures/UnionFind/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/data_structures/UnionFind/tests_union_find.py b/data_structures/UnionFind/tests_union_find.py deleted file mode 100644 index b0708778d..000000000 --- a/data_structures/UnionFind/tests_union_find.py +++ /dev/null @@ -1,78 +0,0 @@ -from __future__ import absolute_import -from .union_find import UnionFind -import unittest - - -class TestUnionFind(unittest.TestCase): - def test_init_with_valid_size(self): - uf = UnionFind(5) - self.assertEqual(uf.size, 5) - - def test_init_with_invalid_size(self): - with self.assertRaises(ValueError): - uf = UnionFind(0) - - with self.assertRaises(ValueError): - uf = UnionFind(-5) - - def test_union_with_valid_values(self): - uf = UnionFind(10) - - for i in range(11): - for j in range(11): - uf.union(i, j) - - def test_union_with_invalid_values(self): - uf = UnionFind(10) - - with self.assertRaises(ValueError): - uf.union(-1, 1) - - with self.assertRaises(ValueError): - uf.union(11, 1) - - def test_same_set_with_valid_values(self): - uf = UnionFind(10) - - for i in range(11): - for j in range(11): - if i == j: - self.assertTrue(uf.same_set(i, j)) - else: - self.assertFalse(uf.same_set(i, j)) - - uf.union(1, 2) - self.assertTrue(uf.same_set(1, 2)) - - uf.union(3, 4) - self.assertTrue(uf.same_set(3, 4)) - - self.assertFalse(uf.same_set(1, 3)) - self.assertFalse(uf.same_set(1, 4)) - self.assertFalse(uf.same_set(2, 3)) - self.assertFalse(uf.same_set(2, 4)) - - uf.union(1, 3) - self.assertTrue(uf.same_set(1, 3)) - self.assertTrue(uf.same_set(1, 4)) - self.assertTrue(uf.same_set(2, 3)) - self.assertTrue(uf.same_set(2, 4)) - - uf.union(4, 10) - self.assertTrue(uf.same_set(1, 10)) - self.assertTrue(uf.same_set(2, 10)) - self.assertTrue(uf.same_set(3, 10)) - self.assertTrue(uf.same_set(4, 10)) - - def test_same_set_with_invalid_values(self): - uf = UnionFind(10) - - with self.assertRaises(ValueError): - uf.same_set(-1, 1) - - with self.assertRaises(ValueError): - uf.same_set(11, 0) - - -if __name__ == '__main__': - unittest.main() diff --git a/data_structures/UnionFind/union_find.py b/data_structures/UnionFind/union_find.py deleted file mode 100644 index 40eea67ac..000000000 --- a/data_structures/UnionFind/union_find.py +++ /dev/null @@ -1,87 +0,0 @@ -class UnionFind(): - """ - https://en.wikipedia.org/wiki/Disjoint-set_data_structure - - The union-find is a disjoint-set data structure - - You can merge two sets and tell if one set belongs to - another one. - - It's used on the Kruskal Algorithm - (https://en.wikipedia.org/wiki/Kruskal%27s_algorithm) - - The elements are in range [0, size] - """ - def __init__(self, size): - if size <= 0: - raise ValueError("size should be greater than 0") - - self.size = size - - # The below plus 1 is because we are using elements - # in range [0, size]. It makes more sense. - - # Every set begins with only itself - self.root = [i for i in range(size+1)] - - # This is used for heuristic union by rank - self.weight = [0 for i in range(size+1)] - - def union(self, u, v): - """ - Union of the sets u and v. - Complexity: log(n). - Amortized complexity: < 5 (it's very fast). - """ - - self._validate_element_range(u, "u") - self._validate_element_range(v, "v") - - if u == v: - return - - # Using union by rank will guarantee the - # log(n) complexity - rootu = self._root(u) - rootv = self._root(v) - weight_u = self.weight[rootu] - weight_v = self.weight[rootv] - if weight_u >= weight_v: - self.root[rootv] = rootu - if weight_u == weight_v: - self.weight[rootu] += 1 - else: - self.root[rootu] = rootv - - def same_set(self, u, v): - """ - Return true if the elements u and v belongs to - the same set - """ - - self._validate_element_range(u, "u") - self._validate_element_range(v, "v") - - return self._root(u) == self._root(v) - - def _root(self, u): - """ - Get the element set root. - This uses the heuristic path compression - See wikipedia article for more details. - """ - - if u != self.root[u]: - self.root[u] = self._root(self.root[u]) - - return self.root[u] - - def _validate_element_range(self, u, element_name): - """ - Raises ValueError if element is not in range - """ - if u < 0 or u > self.size: - msg = ("element {0} with value {1} " - "should be in range [0~{2}]")\ - .format(element_name, u, self.size) - raise ValueError(msg) diff --git a/dynamic_programming/FloydWarshall.py b/dynamic_programming/FloydWarshall.py deleted file mode 100644 index 038499ca0..000000000 --- a/dynamic_programming/FloydWarshall.py +++ /dev/null @@ -1,37 +0,0 @@ -import math - -class Graph: - - def __init__(self, N = 0): # a graph with Node 0,1,...,N-1 - self.N = N - self.W = [[math.inf for j in range(0,N)] for i in range(0,N)] # adjacency matrix for weight - self.dp = [[math.inf for j in range(0,N)] for i in range(0,N)] # dp[i][j] stores minimum distance from i to j - - def addEdge(self, u, v, w): - self.dp[u][v] = w - - def floyd_warshall(self): - for k in range(0,self.N): - for i in range(0,self.N): - for j in range(0,self.N): - self.dp[i][j] = min(self.dp[i][j], self.dp[i][k] + self.dp[k][j]) - - def showMin(self, u, v): - return self.dp[u][v] - -if __name__ == '__main__': - graph = Graph(5) - graph.addEdge(0,2,9) - graph.addEdge(0,4,10) - graph.addEdge(1,3,5) - graph.addEdge(2,3,7) - graph.addEdge(3,0,10) - graph.addEdge(3,1,2) - graph.addEdge(3,2,1) - graph.addEdge(3,4,6) - graph.addEdge(4,1,3) - graph.addEdge(4,2,4) - graph.addEdge(4,3,9) - graph.floyd_warshall() - graph.showMin(1,4) - graph.showMin(0,3) diff --git a/linear-algebra-python/README.md b/linear-algebra-python/README.md deleted file mode 100644 index ebfcdab7b..000000000 --- a/linear-algebra-python/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Linear algebra library for Python - -This module contains some useful classes and functions for dealing with linear algebra in python 2. - ---- - -## Overview - -- class Vector - - This class represents a vector of arbitray size and operations on it. - - **Overview about the methods:** - - - constructor(components : list) : init the vector - - set(components : list) : changes the vector components. - - __str__() : toString method - - component(i : int): gets the i-th component (start by 0) - - size() : gets the size of the vector (number of components) - - euclidLength() : returns the eulidean length of the vector. - - operator + : vector addition - - operator - : vector subtraction - - operator * : scalar multiplication and dot product - - copy() : copies this vector and returns it. - - changeComponent(pos,value) : changes the specified component. - -- function zeroVector(dimension) - - returns a zero vector of 'dimension' -- function unitBasisVector(dimension,pos) - - returns a unit basis vector with a One at index 'pos' (indexing at 0) -- function axpy(scalar,vector1,vector2) - - computes the axpy operation -- function randomVector(N,a,b) - - returns a random vector of size N, with random integer components between 'a' and 'b'. -- class Matrix - - This class represents a matrix of arbitrary size and operations on it. - - **Overview about the methods:** - - - __str__() : returns a string representation - - operator * : implements the matrix vector multiplication - implements the matrix-scalar multiplication. - - changeComponent(x,y,value) : changes the specified component. - - component(x,y) : returns the specified component. - - width() : returns the width of the matrix - - height() : returns the height of the matrix - - operator + : implements the matrix-addition. - - operator - _ implements the matrix-subtraction -- function squareZeroMatrix(N) - - returns a square zero-matrix of dimension NxN -- function randomMatrix(W,H,a,b) - - returns a random matrix WxH with integer components between 'a' and 'b' ---- - -## Documentation - -The module is well documented. You can use the python in-built ```help(...)``` function. -For instance: ```help(Vector)``` gives you all information about the Vector-class. -Or ```help(unitBasisVector)``` gives you all information you needed about the -global function ```unitBasisVector(...)```. If you need informations about a certain -method you type ```help(CLASSNAME.METHODNAME)```. - ---- - -## Usage - -You will find the module in the **src** directory its called ```lib.py```. You need to -import this module in your project. Alternative you can also use the file ```lib.pyc``` in python-bytecode. - ---- - -## Tests - -In the **src** directory you also find the test-suite, its called ```tests.py```. -The test-suite uses the built-in python-test-framework **unittest**. diff --git a/linear-algebra-python/src/lib.py b/linear-algebra-python/src/lib.py deleted file mode 100644 index 66f27ff89..000000000 --- a/linear-algebra-python/src/lib.py +++ /dev/null @@ -1,364 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Mon Feb 26 14:29:11 2018 - -@author: Christian Bender -@license: MIT-license - -This module contains some useful classes and functions for dealing -with linear algebra in python. - -Overview: - -- class Vector -- function zeroVector(dimension) -- function unitBasisVector(dimension,pos) -- function axpy(scalar,vector1,vector2) -- function randomVector(N,a,b) -- class Matrix -- function squareZeroMatrix(N) -- function randomMatrix(W,H,a,b) -""" - - -import math -import random - - -class Vector(object): - """ - This class represents a vector of arbitray size. - You need to give the vector components. - - Overview about the methods: - - constructor(components : list) : init the vector - set(components : list) : changes the vector components. - __str__() : toString method - component(i : int): gets the i-th component (start by 0) - size() : gets the size of the vector (number of components) - euclidLength() : returns the eulidean length of the vector. - operator + : vector addition - operator - : vector subtraction - operator * : scalar multiplication and dot product - copy() : copies this vector and returns it. - changeComponent(pos,value) : changes the specified component. - TODO: compare-operator - """ - def __init__(self,components): - """ - input: components or nothing - simple constructor for init the vector - """ - self.__components = components - def set(self,components): - """ - input: new components - changes the components of the vector. - replace the components with newer one. - """ - if len(components) > 0: - self.__components = components - else: - raise Exception("please give any vector") - def __str__(self): - """ - returns a string representation of the vector - """ - ans = "(" - length = len(self.__components) - for i in range(length): - if i != length-1: - ans += str(self.__components[i]) + "," - else: - ans += str(self.__components[i]) + ")" - if len(ans) == 1: - ans += ")" - return ans - def component(self,i): - """ - input: index (start at 0) - output: the i-th component of the vector. - """ - if i < len(self.__components) and i >= 0: - return self.__components[i] - else: - raise Exception("index out of range") - def size(self): - """ - returns the size of the vector - """ - return len(self.__components) - def eulidLength(self): - """ - returns the eulidean length of the vector - """ - summe = 0 - for c in self.__components: - summe += c**2 - return math.sqrt(summe) - def __add__(self,other): - """ - input: other vector - assumes: other vector has the same size - returns a new vector that represents the sum. - """ - size = self.size() - result = [] - if size == other.size(): - for i in range(size): - result.append(self.__components[i] + other.component(i)) - else: - raise Exception("must have the same size") - return Vector(result) - def __sub__(self,other): - """ - input: other vector - assumes: other vector has the same size - returns a new vector that represents the differenz. - """ - size = self.size() - result = [] - if size == other.size(): - for i in range(size): - result.append(self.__components[i] - other.component(i)) - else: # error case - raise Exception("must have the same size") - return Vector(result) - def __mul__(self,other): - """ - mul implements the scalar multiplication - and the dot-product - """ - ans = [] - if isinstance(other,float) or isinstance(other,int): - for c in self.__components: - ans.append(c*other) - elif (isinstance(other,Vector) and (self.size() == other.size())): - size = self.size() - summe = 0 - for i in range(size): - summe += self.__components[i] * other.component(i) - return summe - else: # error case - raise Exception("invalide operand!") - return Vector(ans) - def copy(self): - """ - copies this vector and returns it. - """ - components = [x for x in self.__components] - return Vector(components) - def changeComponent(self,pos,value): - """ - input: an index (pos) and a value - changes the specified component (pos) with the - 'value' - """ - #precondition - assert (pos >= 0 and pos < len(self.__components)) - self.__components[pos] = value - -def zeroVector(dimension): - """ - returns a zero-vector of size 'dimension' - """ - #precondition - assert(isinstance(dimension,int)) - ans = [] - for i in range(dimension): - ans.append(0) - return Vector(ans) - - -def unitBasisVector(dimension,pos): - """ - returns a unit basis vector with a One - at index 'pos' (indexing at 0) - """ - #precondition - assert(isinstance(dimension,int) and (isinstance(pos,int))) - ans = [] - for i in range(dimension): - if i != pos: - ans.append(0) - else: - ans.append(1) - return Vector(ans) - - -def axpy(scalar,x,y): - """ - input: a 'scalar' and two vectors 'x' and 'y' - output: a vector - computes the axpy operation - """ - # precondition - assert(isinstance(x,Vector) and (isinstance(y,Vector)) \ - and (isinstance(scalar,int) or isinstance(scalar,float))) - return (x*scalar + y) - - -def randomVector(N,a,b): - """ - input: size (N) of the vector. - random range (a,b) - output: returns a random vector of size N, with - random integer components between 'a' and 'b'. - """ - ans = zeroVector(N) - random.seed(None) - for i in range(N): - ans.changeComponent(i,random.randint(a,b)) - return ans - - -class Matrix(object): - """ - class: Matrix - This class represents a arbitrary matrix. - - Overview about the methods: - - __str__() : returns a string representation - operator * : implements the matrix vector multiplication - implements the matrix-scalar multiplication. - changeComponent(x,y,value) : changes the specified component. - component(x,y) : returns the specified component. - width() : returns the width of the matrix - height() : returns the height of the matrix - operator + : implements the matrix-addition. - operator - _ implements the matrix-subtraction - """ - def __init__(self,matrix,w,h): - """ - simple constructor for initialzes - the matrix with components. - """ - self.__matrix = matrix - self.__width = w - self.__height = h - def __str__(self): - """ - returns a string representation of this - matrix. - """ - ans = "" - for i in range(self.__height): - ans += "|" - for j in range(self.__width): - if j < self.__width -1: - ans += str(self.__matrix[i][j]) + "," - else: - ans += str(self.__matrix[i][j]) + "|\n" - return ans - def changeComponent(self,x,y, value): - """ - changes the x-y component of this matrix - """ - if x >= 0 and x < self.__height and y >= 0 and y < self.__width: - self.__matrix[x][y] = value - else: - raise Exception ("changeComponent: indices out of bounds") - def component(self,x,y): - """ - returns the specified (x,y) component - """ - if x >= 0 and x < self.__height and y >= 0 and y < self.__width: - return self.__matrix[x][y] - else: - raise Exception ("changeComponent: indices out of bounds") - def width(self): - """ - getter for the width - """ - return self.__width - def height(self): - """ - getter for the height - """ - return self.__height - def __mul__(self,other): - """ - implements the matrix-vector multiplication. - implements the matrix-scalar multiplication - """ - if isinstance(other, Vector): # vector-matrix - if (other.size() == self.__width): - ans = zeroVector(self.__height) - for i in range(self.__height): - summe = 0 - for j in range(self.__width): - summe += other.component(j) * self.__matrix[i][j] - ans.changeComponent(i,summe) - summe = 0 - return ans - else: - raise Exception("vector must have the same size as the " - + "number of columns of the matrix!") - elif isinstance(other,int) or isinstance(other,float): # matrix-scalar - matrix = [] - for i in range(self.__height): - row = [] - for j in range(self.__width): - row.append(self.__matrix[i][j] * other) - matrix.append(row) - return Matrix(matrix,self.__width,self.__height) - def __add__(self,other): - """ - implements the matrix-addition. - """ - if (self.__width == other.width() and self.__height == other.height()): - matrix = [] - for i in range(self.__height): - row = [] - for j in range(self.__width): - row.append(self.__matrix[i][j] + other.component(i,j)) - matrix.append(row) - return Matrix(matrix,self.__width,self.__height) - else: - raise Exception("matrix must have the same dimension!") - def __sub__(self,other): - """ - implements the matrix-subtraction. - """ - if (self.__width == other.width() and self.__height == other.height()): - matrix = [] - for i in range(self.__height): - row = [] - for j in range(self.__width): - row.append(self.__matrix[i][j] - other.component(i,j)) - matrix.append(row) - return Matrix(matrix,self.__width,self.__height) - else: - raise Exception("matrix must have the same dimension!") - - -def squareZeroMatrix(N): - """ - returns a square zero-matrix of dimension NxN - """ - ans = [] - for i in range(N): - row = [] - for j in range(N): - row.append(0) - ans.append(row) - return Matrix(ans,N,N) - - -def randomMatrix(W,H,a,b): - """ - returns a random matrix WxH with integer components - between 'a' and 'b' - """ - matrix = [] - random.seed(None) - for i in range(H): - row = [] - for j in range(W): - row.append(random.randint(a,b)) - matrix.append(row) - return Matrix(matrix,W,H) - - \ No newline at end of file diff --git a/linear-algebra-python/src/tests.py b/linear-algebra-python/src/tests.py deleted file mode 100644 index b84612b4c..000000000 --- a/linear-algebra-python/src/tests.py +++ /dev/null @@ -1,133 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Mon Feb 26 15:40:07 2018 - -@author: Christian Bender -@license: MIT-license - -This file contains the test-suite for the linear algebra library. -""" - -import unittest -from lib import * - -class Test(unittest.TestCase): - def test_component(self): - """ - test for method component - """ - x = Vector([1,2,3]) - self.assertEqual(x.component(0),1) - self.assertEqual(x.component(2),3) - try: - y = Vector() - self.assertTrue(False) - except: - self.assertTrue(True) - def test_str(self): - """ - test for toString() method - """ - x = Vector([0,0,0,0,0,1]) - self.assertEqual(x.__str__(),"(0,0,0,0,0,1)") - def test_size(self): - """ - test for size()-method - """ - x = Vector([1,2,3,4]) - self.assertEqual(x.size(),4) - def test_euclidLength(self): - """ - test for the eulidean length - """ - x = Vector([1,2]) - self.assertAlmostEqual(x.eulidLength(),2.236,3) - def test_add(self): - """ - test for + operator - """ - x = Vector([1,2,3]) - y = Vector([1,1,1]) - self.assertEqual((x+y).component(0),2) - self.assertEqual((x+y).component(1),3) - self.assertEqual((x+y).component(2),4) - def test_sub(self): - """ - test for - operator - """ - x = Vector([1,2,3]) - y = Vector([1,1,1]) - self.assertEqual((x-y).component(0),0) - self.assertEqual((x-y).component(1),1) - self.assertEqual((x-y).component(2),2) - def test_mul(self): - """ - test for * operator - """ - x = Vector([1,2,3]) - a = Vector([2,-1,4]) # for test of dot-product - b = Vector([1,-2,-1]) - self.assertEqual((x*3.0).__str__(),"(3.0,6.0,9.0)") - self.assertEqual((a*b),0) - def test_zeroVector(self): - """ - test for the global function zeroVector(...) - """ - self.assertTrue(zeroVector(10).__str__().count("0") == 10) - def test_unitBasisVector(self): - """ - test for the global function unitBasisVector(...) - """ - self.assertEqual(unitBasisVector(3,1).__str__(),"(0,1,0)") - def test_axpy(self): - """ - test for the global function axpy(...) (operation) - """ - x = Vector([1,2,3]) - y = Vector([1,0,1]) - self.assertEqual(axpy(2,x,y).__str__(),"(3,4,7)") - def test_copy(self): - """ - test for the copy()-method - """ - x = Vector([1,0,0,0,0,0]) - y = x.copy() - self.assertEqual(x.__str__(),y.__str__()) - def test_changeComponent(self): - """ - test for the changeComponent(...)-method - """ - x = Vector([1,0,0]) - x.changeComponent(0,0) - x.changeComponent(1,1) - self.assertEqual(x.__str__(),"(0,1,0)") - def test_str_matrix(self): - A = Matrix([[1,2,3],[2,4,5],[6,7,8]],3,3) - self.assertEqual("|1,2,3|\n|2,4,5|\n|6,7,8|\n",A.__str__()) - def test__mul__matrix(self): - A = Matrix([[1,2,3],[4,5,6],[7,8,9]],3,3) - x = Vector([1,2,3]) - self.assertEqual("(14,32,50)",(A*x).__str__()) - self.assertEqual("|2,4,6|\n|8,10,12|\n|14,16,18|\n",(A*2).__str__()) - def test_changeComponent_matrix(self): - A = Matrix([[1,2,3],[2,4,5],[6,7,8]],3,3) - A.changeComponent(0,2,5) - self.assertEqual("|1,2,5|\n|2,4,5|\n|6,7,8|\n",A.__str__()) - def test_component_matrix(self): - A = Matrix([[1,2,3],[2,4,5],[6,7,8]],3,3) - self.assertEqual(7,A.component(2,1),0.01) - def test__add__matrix(self): - A = Matrix([[1,2,3],[2,4,5],[6,7,8]],3,3) - B = Matrix([[1,2,7],[2,4,5],[6,7,10]],3,3) - self.assertEqual("|2,4,10|\n|4,8,10|\n|12,14,18|\n",(A+B).__str__()) - def test__sub__matrix(self): - A = Matrix([[1,2,3],[2,4,5],[6,7,8]],3,3) - B = Matrix([[1,2,7],[2,4,5],[6,7,10]],3,3) - self.assertEqual("|0,0,-4|\n|0,0,0|\n|0,0,-2|\n",(A-B).__str__()) - def test_squareZeroMatrix(self): - self.assertEqual('|0,0,0,0,0|\n|0,0,0,0,0|\n|0,0,0,0,0|\n|0,0,0,0,0|' - +'\n|0,0,0,0,0|\n',squareZeroMatrix(5).__str__()) - - -if __name__ == "__main__": - unittest.main() \ No newline at end of file diff --git a/simple-client-server/README.md b/simple-client-server/README.md deleted file mode 100644 index f51947f21..000000000 --- a/simple-client-server/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# simple client server - -#### Note: -- Run **`server.py`** first. -- Now, run **`client.py`**. -- verify the output. diff --git a/simple-client-server/client.py b/simple-client-server/client.py deleted file mode 100644 index c91e6233a..000000000 --- a/simple-client-server/client.py +++ /dev/null @@ -1,14 +0,0 @@ -# client.py - -import socket - -HOST, PORT = '127.0.0.1', 1400 - -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -s.connect((HOST, PORT)) - -s.send(b'Hello World') -data = s.recv(1024) - -s.close() -print(repr(data.decode('ascii'))) diff --git a/simple-client-server/server.py b/simple-client-server/server.py deleted file mode 100644 index c6b661d99..000000000 --- a/simple-client-server/server.py +++ /dev/null @@ -1,21 +0,0 @@ -# server.py - -import socket - -HOST, PORT = '127.0.0.1', 1400 - -s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -s.bind((HOST, PORT)) -s.listen(1) - -conn, addr = s.accept() - -print('connected to:', addr) - -while 1: - data = conn.recv(1024) - if not data: - break - conn.send(data + b' [ addition by server ]') - -conn.close()