Data Structures, Fall 2007

Data Structures, Fall 2007

���Ƶ��c

Course Information
InstructorIris Hui-Ru Jiang (hrjiang@faculty.nctu.edu.tw) ext. 31211, ED540
Lecture TimeMondays B, Thursdays EF@EC016
(from Oct. 1st, 2007)
Text

Text: E. Horowitz, S. Sahni, and D. P. Mehta, Fundamentals of Data Structures in C++, 2nd Ed., Silicon Press, 2007. ISBN: 0929306376.

Reference 1H. Deitel and P. Deitel, C++ How to Program, 5th Ed., Prentice Hall, 2005. ISBN: 0131971093.
Reference 2T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to
Algorithms, 2nd Ed., MIT Press/McGraw Hill, 2001. ISBN: 0-262-03293-7/0-07-
013151-1.
Reference 3J. Kleinberg and E. Tardos, Algorithm Design, Pearson, 2006. ISBN: 0-321-
37291-3.
TAWan-Yu Lee and Liang-Gi Chang (ds.2007fall@gmail.com) ext. 54236, ED518
Grading InformationFinal status: grading (2008/02/02)

1. Final grading (2008/02/02)
2. Happy Chinese New Year!
3.

Syllabussyllabus (2007/09/10)
Administrative Matterslec0 (2007/09/18)
Article�ڤ����D-���a�P (2007/07/30 �p��) (2007/09/18)
ArticleWhy universities require CS students to take math? (2007/09/18)

Address

Steve Jobs' commencement address at Stanford, June 2005 (2008/01/03)

Chapter 1lec1 (2007/09/19, pp. 16-25 slightly modified, pp. 26-40 added)
Chapter 2lec2 (2007/10/05, pp. 17, 18, 23, 24 updated)
Chapter 3lec3 (2007/10/24, pp. 29-37 added)
Chapter 4lec4 (2007/11/04, pp. 39~ added)
Chapter 5lec5 (2008/01/14, pp. 27, 30, 58 updaed)
Chapter 6 lec6 (2008/01/14, pp. 23, 36 updated)
Chapter 7lec7 (2007/12/28, pp. 12, 13, 20, 21 updated)
Chapter 8 lec8 (2008/01/01, pp. 8 updated)

Homework 1

hw1 (2007/09/20) readme (2007/09/27) ex1 (2007/09/28) solution (2007/11/05)

Homework 2

hw2 (2007/10/05) readme (2007/10/18) solution (2007/11/05)

Homework 3

hw3 (2007/10/25) readme (2007/10/29) solution (2007/11/12)

Program 2

prog2 (2007/11/05, updated in BLUE) due 11:59pm, Nov. 11. Late submission open! (2007/11/15)

Homework 4

hw4 (2007/11/05) solution (2007/11/12, 10% bonus)

Program 3

prog3 (2007/11/23) test cases (2007/12/01) readme (2007/12/06)

Homework 5

hw5 (2007/12/14) solution (2008/01/08)

Program 4

prog4 (2008/01/01, modification is highlighted in red) test cases (2007/12/21) example (2008/01/03, pp. 4 updated) demo (2008/01/07)

Homework 6

hw6 (2007/12/28) solution (2008/01/08)

1. MIT's OpenCourseWare - free online course materials for self learners.
2. Algorithms - Prof. Y.-W. Chang, NTU GIEE, Fall 2006
3. Communications of the ACM
4. IEEE Spectrum
5. STL consists of numerous implementations for data structures, graph algorithms, etc.
6. LEDA also consists of numerous implementations for data structures, graph algorithms, etc.
7. Microsoft Developer Network has nice documents.
8. Source codes for the textbook.
9. Microsoft Developer Network has nice documents.
10.
ImportError Traceback (most recent call last) File D:\anaconda3\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py:73 72 try: ---> 73 from tensorflow.python._pywrap_tensorflow_internal import * 74 # This try catch logic is because there is no bazel equivalent for py_extension. 75 # Externally in opensource we must enable exceptions to load the shared object 76 # by exposing the PyInit symbols with pybind. This error will only be 77 # caught internally or if someone changes the name of the target _pywrap_tensorflow_internal. 78 79 # This logic is used in other internal projects using py_extension. ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。 During handling of the above exception, another exception occurred: ImportError Traceback (most recent call last) Cell In[12], line 5 3 import numpy as np 4 import pandas as pd ----> 5 from keras.models import Sequential, load_model 6 from tensorflow.keras import utils 7 from keras.preprocessing.sequence import pad_sequences File ~\AppData\Roaming\Python\Python311\site-packages\keras\__init__.py:7 1 """DO NOT EDIT. 2 3 This file was autogenerated. Do not edit it by hand, 4 since your modifications would be overwritten. 5 """ ----> 7 from keras import _tf_keras as _tf_keras 8 from keras import activations as activations 9 from keras import applications as applications File ~\AppData\Roaming\Python\Python311\site-packages\keras\_tf_keras\__init__.py:1 ----> 1 from keras._tf_keras import keras File ~\AppData\Roaming\Python\Python311\site-packages\keras\_tf_keras\keras\__init__.py:7 1 """DO NOT EDIT. 2 3 This file was autogenerated. Do not edit it by hand, 4 since your modifications would be overwritten. 5 """ ----> 7 from keras import activations as activations 8 from keras import applications as applications 9 from keras import callbacks as callbacks File ~\AppData\Roaming\Python\Python311\site-packages\keras\activations\__init__.py:7 1 """DO NOT EDIT. 2 3 This file was autogenerated. Do not edit it by hand, 4 since your modifications would be overwritten. 5 """ ----> 7 from keras.src.activations import deserialize as deserialize 8 from keras.src.activations import get as get 9 from keras.src.activations import serialize as serialize File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\__init__.py:1 ----> 1 from keras.src import activations 2 from keras.src import applications 3 from keras.src import backend File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\activations\__init__.py:3 1 import types ----> 3 from keras.src.activations.activations import celu 4 from keras.src.activations.activations import elu 5 from keras.src.activations.activations import exponential File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\activations\activations.py:1 ----> 1 from keras.src import backend 2 from keras.src import ops 3 from keras.src.api_export import keras_export File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\backend\__init__.py:1 ----> 1 from keras.src.backend.config import backend 3 if backend() == "torch": 4 # When using the torch backend, 5 # torch needs to be imported first, otherwise it will segfault 6 # upon import. 7 import torch File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\backend\config.py:448 445 else: 446 _NNX_ENABLED = False --> 448 set_nnx_enabled(_NNX_ENABLED) File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\backend\config.py:249, in set_nnx_enabled(value) 247 def set_nnx_enabled(value): 248 global _NNX_ENABLED --> 249 from keras.src.backend.common import global_state 251 _NNX_ENABLED = bool(value) 252 if _NNX_ENABLED: File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\backend\common\__init__.py:2 1 from keras.src.backend.common import backend_utils ----> 2 from keras.src.backend.common.dtypes import result_type 3 from keras.src.backend.common.variables import AutocastScope 4 from keras.src.backend.common.variables import Variable as KerasVariable File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\backend\common\dtypes.py:5 3 from keras.src.api_export import keras_export 4 from keras.src.backend import config ----> 5 from keras.src.backend.common.variables import standardize_dtype 7 BOOL_TYPES = ("bool",) 8 INT_TYPES = ( 9 "uint8", 10 "uint16", (...) 16 "int64", 17 ) File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\backend\common\variables.py:12 10 from keras.src.backend.common.stateless_scope import in_stateless_scope 11 from keras.src.utils.module_utils import tensorflow as tf ---> 12 from keras.src.utils.naming import auto_name 15 class Variable: 16 """Represents a backend-agnostic variable in Keras. 17 18 A `Variable` acts as a container for state. It holds a tensor value and can (...) 89 ``` 90 """ File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\utils\__init__.py:1 ----> 1 from keras.src.utils.audio_dataset_utils import audio_dataset_from_directory 2 from keras.src.utils.dataset_utils import split_dataset 3 from keras.src.utils.file_utils import get_file File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\utils\audio_dataset_utils.py:4 1 import numpy as np 3 from keras.src.api_export import keras_export ----> 4 from keras.src.utils import dataset_utils 5 from keras.src.utils.module_utils import tensorflow as tf 6 from keras.src.utils.module_utils import tensorflow_io as tfio File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\utils\dataset_utils.py:10 7 import numpy as np 9 from keras.src import backend ---> 10 from keras.src import tree 11 from keras.src.api_export import keras_export 12 from keras.src.utils import file_utils File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\tree\__init__.py:1 ----> 1 from keras.src.tree.tree_api import assert_same_paths 2 from keras.src.tree.tree_api import assert_same_structure 3 from keras.src.tree.tree_api import flatten File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\tree\tree_api.py:13 11 from keras.src.tree import torchtree_impl as tree_impl 12 elif optree.available: ---> 13 from keras.src.tree import optree_impl as tree_impl 14 elif dmtree.available: 15 from keras.src.tree import dmtree_impl as tree_impl File ~\AppData\Roaming\Python\Python311\site-packages\keras\src\tree\optree_impl.py:13 11 # Register backend-specific node classes 12 if backend() == "tensorflow": ---> 13 from tensorflow.python.trackable.data_structures import ListWrapper 14 from tensorflow.python.trackable.data_structures import _DictWrapper 16 try: File D:\anaconda3\Lib\site-packages\tensorflow\python\trackable\data_structures.py:26 22 except ImportError: 23 # Fall back to the build-time dependency if the system package is not available. 24 from .....third_party import wrapt # pylint: disable=relative-beyond-top-level ---> 26 from tensorflow.python.eager import def_function 27 from tensorflow.python.eager import function as defun 28 from tensorflow.python.ops import variables File D:\anaconda3\Lib\site-packages\tensorflow\python\eager\def_function.py:24 21 from tensorflow.python.eager.polymorphic_function.eager_function_run import functions_run_eagerly 23 # tf.function Classes ---> 24 from tensorflow.python.eager.polymorphic_function.polymorphic_function import Function 25 from tensorflow.python.eager.polymorphic_function.polymorphic_function import function 27 # Private attributes File D:\anaconda3\Lib\site-packages\tensorflow\python\eager\polymorphic_function\polymorphic_function.py:74 72 from google.protobuf.message import DecodeError 73 from tensorflow.core.framework import attr_value_pb2 ---> 74 from tensorflow.core.function import trace_type 75 from tensorflow.core.function.capture import capture_container 76 from tensorflow.core.function.polymorphism import function_cache File D:\anaconda3\Lib\site-packages\tensorflow\core\function\trace_type\__init__.py:28 1 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); (...) 13 # limitations under the License. 14 # ============================================================================== 15 """Trace-time type system for tf.function (TraceType). 16 17 Trace-time types describe things like tf.function signatures and type (...) 25 Other implementations of TraceType include tf.TypeSpec and its subclasses. 26 """ ---> 28 from tensorflow.core.function.trace_type.default_types import register_tensor_type 29 from tensorflow.core.function.trace_type.default_types import Weakref 30 from tensorflow.core.function.trace_type.serialization import deserialize File D:\anaconda3\Lib\site-packages\tensorflow\core\function\trace_type\default_types.py:26 24 from tensorflow.core.function.trace_type import serialization 25 from tensorflow.core.function.trace_type import util ---> 26 from tensorflow.python.types import trace 28 # Register the TraceType of Tensor (aka TensorSpec) to avoid cyclic dependency. 29 TENSOR = None File D:\anaconda3\Lib\site-packages\tensorflow\python\types\trace.py:34 31 from typing_extensions import Protocol 32 from typing_extensions import runtime_checkable ---> 34 from tensorflow.python.types import core 35 from tensorflow.python.util.tf_export import tf_export 36 from tensorflow.tools.docs import doc_controls File D:\anaconda3\Lib\site-packages\tensorflow\python\types\core.py:28 23 import numpy as np 25 from tensorflow.python.types import doc_typealias ---> 28 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import, g-bad-import-order 29 from tensorflow.python.util.tf_export import tf_export 31 # pylint:disable=g-import-not-at-top File D:\anaconda3\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py:88 86 sys.setdlopenflags(_default_dlopen_flags) 87 except ImportError: ---> 88 raise ImportError( 89 f'{traceback.format_exc()}' 90 f'\n\nFailed to load the native TensorFlow runtime.\n' 91 f'See https://www.tensorflow.org/install/errors ' 92 f'for some common causes and solutions.\n' 93 f'If you need help, create an issue ' 94 f'at https://github.com/tensorflow/tensorflow/issues ' 95 f'and include the entire stack trace above this error message.') ImportError: Traceback (most recent call last): File "D:\anaconda3\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 73, in <module> from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。 Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common causes and solutions. If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message.
10-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值